Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Need better error message when missing credentials #33

Open
ryanewel opened this issue Aug 13, 2019 · 0 comments
Open

Need better error message when missing credentials #33

ryanewel opened this issue Aug 13, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@ryanewel
Copy link
Member

OS: Ubuntu 16.04
ROS Distro: Kinetic

When running roslaunch tts sample_application.launch without credentials I get the following error message:

Traceback (most recent call last):
  File "/ws/polly_test_ws/install/tts/lib/tts/polly_node.py", line 19, in <module>
    tts.amazonpolly.main()
  File "/ws/polly_test_ws/install/tts/lib/python2.7/dist-packages/tts/amazonpolly.py", line 424, in main
    AmazonPolly().start(node_name=node_name, service_name=service_name)
  File "/ws/polly_test_ws/install/tts/lib/python2.7/dist-packages/tts/amazonpolly.py", line 186, in __init__
    self.polly = self._get_polly_client(aws_access_key_id, aws_secret_access_key, aws_session_token, region_name)
  File "/ws/polly_test_ws/install/tts/lib/python2.7/dist-packages/tts/amazonpolly.py", line 217, in _get_polly_client
    return session.client("polly")
  File "/usr/lib/python2.7/dist-packages/boto3/session.py", line 263, in client
    aws_session_token=aws_session_token, config=config)
  File "/usr/lib/python2.7/dist-packages/botocore/session.py", line 850, in create_client
    credentials = self.get_credentials()
  File "/usr/lib/python2.7/dist-packages/botocore/session.py", line 474, in get_credentials
    'credential_provider').load_credentials()
  File "/usr/lib/python2.7/dist-packages/botocore/credentials.py", line 1662, in load_credentials
    creds = provider.load()
  File "/ws/polly_test_ws/install/tts/lib/python2.7/dist-packages/tts/amazonpolly.py", line 92, in load
    'aws-iot-with-certificate'
  File "/usr/lib/python2.7/dist-packages/botocore/credentials.py", line 308, in create_from_metadata
    access_key=metadata['access_key'],
TypeError: 'NoneType' object has no attribute '__getitem__'
[polly_node-2] process has died [pid 4631, exit code 1, cmd /ws/polly_test_ws/install/tts/lib/tts/polly_node.py __name:=polly_node __log:=/root/.ros/log/173ce162-be0f-11e9-b033-0242ac110003/polly_node-2.log].
log file: /root/.ros/log/173ce162-be0f-11e9-b033-0242ac110003/polly_node-2*.log

It looks like this is caused by missing credentials (and is solved by configuring my AWS credentials). That's not immediately obvious from the error message.

@jaisontj jaisontj added the enhancement New feature or request label Oct 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants