Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DecrepationWarning from watson_developer_cloud.DiscoveryV1() #6

Closed
kalleknast opened this issue Jan 25, 2020 · 0 comments
Closed

DecrepationWarning from watson_developer_cloud.DiscoveryV1() #6

kalleknast opened this issue Jan 25, 2020 · 0 comments

Comments

@kalleknast
Copy link

discovery = watson_developer_cloud.DiscoveryV1(
                        version='2018-08-01',
                        url=discovery_creds['url'],
                        iam_apikey=discovery_creds['apikey'])

Throws the following warning:

DeprecationWarning: watson-developer-cloud moved to ibm-watson. To get updates, use the new package.

To follow the instructions and update the notebook ibm-watson and ibm-cloud-sdk-core can be installed with pip and imported as follows:

import ibm_watson
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator

By using IAMAuthenticator discovery can be instantiated:

authenticator = IAMAuthenticator(apikey=discovery_creds['apikey'],
                                                       url=discovery_creds['url'])
discovery = ibm_watson.DiscoveryV1(version='2018-08-01',
                                                              authenticator=authenticator)

However, both listing and creating environments now throws an error:

environments = discovery.list_environments().get_result()
ApiException: Error: Not Found, Code: 404

and

# Prepare an environment to work in
env, env_id = helper.fetch_object(
    discovery, "environment", "Bookworm",
    create=True, create_args=dict(
        description="A space to read and understand stories"  # feel free to edit
    ))

ApiException: Error: Not Found, Code: 404
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants