okigan/awscurl

"botocore package could not be loaded"

mcteo opened this issue · 0 comments

mcteo commented

Hi all,

I installed awscurl via brew, so I thought that might be the issue, but I've reproduced the issue dependently in a virtualenv.

I'm running: awscurl -v --profile profile-name https://api.example.com

{'access_key': None,
 'data': '',
 'data_binary': False,
 'header': None,
 'include': False,
 'insecure': False,
 'location': False,
 'profile': 'profile-name',
 'region': 'us-east-1',
 'request': 'GET',
 'secret_key': None,
 'security_token': None,
 'service': 'execute-api',
 'session_token': None,
 'uri': 'https://api.example.com',
 'verbose': True}
"Credentials file '/Users/thomas/.aws/credentials' exists 'True'"
'loading botocore package'
'botocore package could not be loaded'
Traceback (most recent call last):
  File "/Users/thomas/awscurl-reproduction/./venv/bin/awscurl", line 8, in <module>
    sys.exit(main())
  File "/Users/thomas/awscurl-reproduction/venv/lib/python3.10/site-packages/awscurl/awscurl.py", line 543, in main
    inner_main(sys.argv[1:])
  File "/Users/thomas/awscurl-reproduction/venv/lib/python3.10/site-packages/awscurl/awscurl.py", line 511, in inner_main
    raise ValueError('No access key is available')
ValueError: No access key is available

I've checked with pip freeze, and manually checked the site-packages dir and can verify that botocore wasn't included.

At the time of writing, pip installed version awscurl==0.29.

I only really created thsi issue as I see a few other issues with the same error, but going down different paths of investigation, and they might find this useful.

EDIT: I've found botocore was under the awslibs extras, so pip install awscurl[awslibs] would pull it in. Not such much needs to be fix then, other than maybe calling this out in the README.md. I'll leave the issue open for the above case though.