IBM / python-sdk-core

The python-sdk-core repository contains core functionality required by Python code generated by the IBM OpenAPI SDK Generator.
Apache License 2.0
20 stars 27 forks source link

ImportError: cannot import name 'get_authenticator_from_environment' #53

Closed nzavg closed 3 years ago

nzavg commented 4 years ago

Hi Team,

I tried to follow your doc: https://github.com/IBM/python-sdk-core/blob/master/Authentication.md and got the following error.

In [1]: from ibm_cloud_sdk_core.authenticators import get_authenticator_from_environment
   ...:
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-e931c8235af5> in <module>
----> 1 from ibm_cloud_sdk_core.authenticators import get_authenticator_from_environment

ImportError: cannot import name 'get_authenticator_from_environment' from 'ibm_cloud_sdk_core.authenticators' (/usr/local/anaconda3/envs/finimp/lib/python3.8/site-packages/ibm_cloud_sdk_core/authenticators/__init__.py)

Seems there is a bit of misalignment because get_authenticator_from_environment is located in the ibm_cloud_sdk_core, not ibm_cloud_sdk_core.authenticators.

Also it would be great to reflect this type of authentication in the main docs, because it was not straightforward to find above mentioned one. https://cloud.ibm.com/apidocs/natural-language-understanding/natural-language-understanding?code=python#authentication https://github.com/watson-developer-cloud/python-sdk#iam

ehdsouza commented 4 years ago

@rmkeezer seems like we need to update the readme

jorge-ibm commented 4 years ago

Looks like the docs still don't reflect the suggested change. Moving this to the backlog since it should be a fairly simple doc change

padamstx commented 3 years ago

Included this change in this PR: https://github.com/IBM/python-sdk-core/pull/104