watson-developer-cloud / python-sdk

:snake: Client library to use the IBM Watson services in Python and available in pip as watson-developer-cloud
https://pypi.org/project/ibm-watson/
Apache License 2.0
1.46k stars 828 forks source link

I was trying to run ibm watson tone analysis api and i got this type of error #685

Closed ghost closed 4 years ago

ghost commented 5 years ago

WatsonApiException Traceback (most recent call last)

in 5 tone = tone_analyzer.tone( 6 {'text': ". ".join(text_B)}, ----> 7 content_type='application/json' 8 ).get_result() 9 ~\Anaconda3\lib\site-packages\watson_developer_cloud\tone_analyzer_v3.py in tone(self, tone_input, content_type, sentences, tones, content_language, accept_language, **kwargs) 205 params=params, 206 data=data, --> 207 accept_json=True) 208 return response 209 ~\Anaconda3\lib\site-packages\watson_developer_cloud\watson_service.py in request(self, method, url, accept_json, headers, params, json, data, files, **kwargs) 585 error_info = self._get_error_info(response) 586 raise WatsonApiException(response.status_code, error_message, --> 587 info=error_info, httpResponse=response) WatsonApiException: Error: Unauthorized: Access is denied due to invalid credentials , Code: 401
ehdsouza commented 5 years ago

@imshalinshah could you follow the issue template to let us help you better?

Overview What is the issue? Be concise and clear.

Expected behavior What did you expect to happen?

Actual behavior What actually happened?

How to reproduce Help us to reproduce what you experienced. Include your code snippets (without credentials)

Screenshots If applicable, add screenshots to help explain your problem.

SDK Version Please provide the SDK version here.

Additional information:

Additional context Add any other details about the problem.

ehdsouza commented 5 years ago

@imshalinshah can you provide more information in the issue template?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.