Can not import MetadataOptions for use in Features request
BryanCutler opened this issue · 2 comments
Remember, an issue is not the place to ask questions. If you have issues with the APIs or have a question about the Watson services, see Stack Overflow.
Before you open an issue, please check if a similar issue already exists or has been closed before.
Check service status
- For service issues or 5xx errors, first, go to the IBM Cloud status page and check the status of the service.
- If the service status is OK, continue with a bug report.
Overview
What is the issue? Be concise and clear.
According to the API reference, feature metadata can be requested by including a MetadataOptions()
, see:
https://cloud.ibm.com/apidocs/natural-language-understanding?code=python#metadata. Attempting to import MetadataOptions
results in an ImportError
.
Expected behavior
What did you expect to happen?
To be able to import MetadataOptions
or make a request that includes metadata in response. This worked at one time a while ago, but not in recent versions.
Actual behavior
What actually happened?
ImportError is raised
How to reproduce
Help us to reproduce what you experienced. Include your code snippets (without credentials)
In [7]: from ibm_watson.natural_language_understanding_v1 import MetadataOptions
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-7-3d6741f86e3b> in <module>
----> 1 from ibm_watson.natural_language_understanding_v1 import MetadataOptions
ImportError: cannot import name 'MetadataOptions' from 'ibm_watson.natural_language_understanding_v1'
Screenshots
If applicable, add screenshots to help explain your problem.
SDK Version
Please provide the SDK version here.
5.0.2, 5.1.0
Additional information:
- OS: for example, iOS
- Which version of
Python
are you using?
Additional context
Add any other details about the problem.
Hi Bryan, thanks for opening the issue, MetadataOptions
is indeed deprecated in v5, we will have docs and migration guide updated soon. Apologies for the invonvenience
No problem, sounds good. Thanks!