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

NoCredentialsError: Unable to locate credentials #48

Closed
sparktwinny opened this issue Jan 27, 2016 · 5 comments
Closed

NoCredentialsError: Unable to locate credentials #48

sparktwinny opened this issue Jan 27, 2016 · 5 comments

Comments

@sparktwinny
Copy link

I keep getting "NoCredentialsError: Unable to locate credentials" even if i thought i provided AWS_access_key and aws_secret_key in configure file.

could you help me?

2016-01-27 12:58:52 thumbor:ERROR ERROR: Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/thumbor/handlers/init.py", line 102, in get_image
self.context.request.image_url
File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 1008, in run
value = future.result()
File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 232, in result
raise_exc_info(self._exc_info)
File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 1017, in run
yielded = self.gen.send(value)
File "/usr/lib64/python2.7/site-packages/thumbor/handlers/init.py", line 442, in _fetch
loader_result = yield self.context.modules.loader.load(self.context, url)
File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 473, in wrapper
future.result()
File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 232, in result
raise_exc_info(self._exc_info)
File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 461, in wrapper
result = f(_args, *_kwargs)
File "/usr/lib/python2.7/site-packages/tc_aws/loaders/s3_loader.py", line 48, in load
bucket_loader.get(key, callback=handle_data)
File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 473, in wrapper
future.result()
File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 232, in result
raise_exc_info(self._exc_info)
File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 461, in wrapper
result = f(_args, *_kwargs)
File "/usr/lib/python2.7/site-packages/tc_aws/aws/bucket.py", line 43, in get
Key=path,
File "/usr/lib/python2.7/site-packages/tornado_botocore/base.py", line 97, in call
return self._make_api_call(operation_name=self.operation, api_params=kwargs, callback=callback)
File "/usr/lib/python2.7/site-packages/tornado_botocore/base.py", line 60, in _make_api_call
operation_model=operation_model, request_dict=request_dict, callback=callback)
File "/usr/lib/python2.7/site-packages/tornado_botocore/base.py", line 54, in _make_request
request_dict=request_dict, operation_model=operation_model, callback=callback)
File "/usr/lib/python2.7/site-packages/tornado_botocore/base.py", line 32, in _send_request
request = self.endpoint.create_request(request_dict, operation_model)
File "/usr/lib/python2.7/site-packages/botocore/endpoint.py", line 120, in create_request
operation_name=operation_model.name)
File "/usr/lib/python2.7/site-packages/botocore/hooks.py", line 226, in emit
return self._emit(event_name, kwargs)
File "/usr/lib/python2.7/site-packages/botocore/hooks.py", line 209, in _emit
response = handler(**kwargs)
File "/usr/lib/python2.7/site-packages/botocore/client.py", line 384, in _sign_request
self._request_signer.sign(operation_name, request)
File "/usr/lib/python2.7/site-packages/botocore/signers.py", line 110, in sign
signer.add_auth(request=request)
File "/usr/lib/python2.7/site-packages/botocore/auth.py", line 621, in add_auth
raise NoCredentialsError

@Bladrak
Copy link

Bladrak commented Jan 27, 2016

As indicated within the README file, the authentication is handled by botocore. See the documentation here: https://boto3.readthedocs.org/en/latest/guide/quickstart.html#configuration

@Bladrak Bladrak closed this as completed Jan 27, 2016
@sparktwinny
Copy link
Author

Thank you a lot!

@prats226
Copy link

@sparktwinny how did you resolved this issue? What was problem in your case?

@ahujarajesh
Copy link

@sparktwinny we also get this error from time to time.
Is this an issue with boto? or python?

we use python 2.7.13

@kkorada
Copy link

kkorada commented May 24, 2018

  • Create a file in ~/.aws/credentials

  • Add below content and save:
    [default]
    aws_access_key_id = YOUR_ACCESS_KEY
    aws_secret_access_key = YOUR_SECRET_KEY

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

5 participants