Closed paulux84 closed 7 years ago
@paulux84
I think this is an issue with botocore version. We are working on this at now but we don't have an answer for that.
For now, You can use a specific version of botocore: pip install botocore==1.3.7
Sorry about this problem. As i wrote above, we work at this. Look issue #62
Whit botocore 1.3.7 i get the following
2016-11-18 13:11:47 thumbor:ERROR ERROR: Traceback (most recent call last):
File "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/lib/python2.7/site-packages/thumbor/handlers/__init__.py", line 142, in get_image
self.context.request.image_url
File "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/lib/python2.7/site-packages/tornado/gen.py", line 1015, in run
value = future.result()
File "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/lib/python2.7/site-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/lib/python2.7/site-packages/tornado/gen.py", line 1024, in run
yielded = self.gen.send(value)
File "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/lib/python2.7/site-packages/thumbor/handlers/__init__.py", line 516, in _fetch
loader_result = yield self.context.modules.loader.load(self.context, url)
File "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/lib/python2.7/site-packages/tornado/concurrent.py", line 478, in wrapper
future.result()
File "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/lib/python2.7/site-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/lib/python2.7/site-packages/tornado/concurrent.py", line 466, in wrapper
result = f(*args, **kwargs)
File "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/lib/python2.7/site-packages/tc_aws/loaders/s3_loader.py", line 49, in load
bucket_loader.get(key, callback=handle_data)
File "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/lib/python2.7/site-packages/tornado/concurrent.py", line 478, in wrapper
future.result()
File "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/lib/python2.7/site-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/lib/python2.7/site-packages/tornado/concurrent.py", line 466, in wrapper
result = f(*args, **kwargs)
File "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/lib/python2.7/site-packages/tc_aws/aws/bucket.py", line 48, in get
Key=self._clean_key(path),
File "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/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 "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/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 "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/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 "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/lib/python2.7/site-packages/tornado_botocore/base.py", line 32, in _send_request
request = self.endpoint.create_request(request_dict, operation_model)
File "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/lib/python2.7/site-packages/botocore/endpoint.py", line 121, in create_request
operation_name=operation_model.name)
File "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/lib/python2.7/site-packages/botocore/hooks.py", line 226, in emit
return self._emit(event_name, kwargs)
File "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/lib/python2.7/site-packages/botocore/hooks.py", line 209, in _emit
response = handler(**kwargs)
File "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/lib/python2.7/site-packages/botocore/signers.py", line 81, in handler
return self.sign(operation_name, request)
File "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/lib/python2.7/site-packages/botocore/signers.py", line 116, in sign
signer.add_auth(request=request)
File "/var/lib/openshift/58107eca2d5271d5a10000da/app-root/data/lib/python2.7/site-packages/botocore/auth.py", line 621, in add_auth
raise NoCredentialsError
NoCredentialsError: Unable to locate credentials
@paulux84
Please take a look at botocore docs (https://boto3.readthedocs.io/en/latest/guide/quickstart.html#configuration) and you'll see how you configure to access S3.
You need to create a aws credential file to access with your SECRET and KEY .
with boto 1.4.7 all works...with 1.3.7 i have created an external aws config file with credential and set its location throught AWS_CONFIG_FILE environment variable...now all works
Thanks for all;)
@paulux84
I looked at botocore repository and i believe version 1.4.76 of Botocore fixed this issue. We will try here but you can try for yourself.
I will try...thanks
still the same issue up to botocore 1.4.81
Tks!
Ok, but how can I solve? With botocore 1.4.7 I reveive the error "Unable to locate credentials" even if I followed the boto docs and I run "aws configure". Could you please explain me how to locate the credentials? I read about create a AWS_CONFIG_FILE environment variable but maybe I did something wrong but it's not working, always same error.
I created the environment variable like this: EXPORT AWS_CONFIG_FILE=/home/ec2-user/.aws/credentials
@johntiror Did you create AWS_CONFIG_FILE env variable? Perhaps you should create this variables with same user that you use to run your python process.
yes, you were right. Thanks very much!
Hi, i have this image and i can normally get it whit my thumbor service here http://thumborservice-weflymate.rhcloud.com/unsafe/https://s3-eu-west-1.amazonaws.com/3cube/thumbor/storage/035de4821bbb4a109a8cfcb2bf4af3a08f9ee298. As you can see the image is on aws s3 and i have configured my thumbor instance to access this s3 instance, but if i try to get image directly from instance (url) i get the following error:
Below there a part of my thumbor.conf file:
Thanks for help ;)