That was the problem, thanks again, -Bryan From: Bryan Banister Looks like I found the problem:
https://github.com/snowflakedb/snowflake-connector-python/issues/1
I’ll try the fixed version of botocore 1.4.87+, -Bryan From: ceph-users [mailto:ceph-users-bounces@xxxxxxxxxxxxxx]
On Behalf Of Bryan Banister Note: External Email Here is the error I get: # python3 boto3_test.py Traceback (most recent call last): File "boto3_test.py", line 15, in <module> for bucket in s3.list_buckets(): File "/jump/software/rhel7/python36_botocore-1.4.85/lib/python3.6/site-packages/botocore/client.py", line 251, in _api_call return self._make_api_call(operation_name, kwargs) File "/jump/software/rhel7/python36_botocore-1.4.85/lib/python3.6/site-packages/botocore/client.py", line 526, in _make_api_call operation_model, request_dict) File "/jump/software/rhel7/python36_botocore-1.4.85/lib/python3.6/site-packages/botocore/endpoint.py", line 141, in make_request return self._send_request(request_dict, operation_model) File "/jump/software/rhel7/python36_botocore-1.4.85/lib/python3.6/site-packages/botocore/endpoint.py", line 170, in _send_request success_response, exception): File "/jump/software/rhel7/python36_botocore-1.4.85/lib/python3.6/site-packages/botocore/endpoint.py", line 249, in _needs_retry caught_exception=caught_exception, request_dict=request_dict) File "/jump/software/rhel7/python36_botocore-1.4.85/lib/python3.6/site-packages/botocore/hooks.py", line 227, in emit return self._emit(event_name, kwargs) File "/jump/software/rhel7/python36_botocore-1.4.85/lib/python3.6/site-packages/botocore/hooks.py", line 210, in _emit response = handler(**kwargs) File "/jump/software/rhel7/python36_botocore-1.4.85/lib/python3.6/site-packages/botocore/retryhandler.py", line 183, in __call__ if self._checker(attempts, response, caught_exception): File "/jump/software/rhel7/python36_botocore-1.4.85/lib/python3.6/site-packages/botocore/retryhandler.py", line 251, in __call__ caught_exception) File "/jump/software/rhel7/python36_botocore-1.4.85/lib/python3.6/site-packages/botocore/retryhandler.py", line 269, in _should_retry return self._checker(attempt_number, response, caught_exception) File "/jump/software/rhel7/python36_botocore-1.4.85/lib/python3.6/site-packages/botocore/retryhandler.py", line 317, in __call__ caught_exception) File "/jump/software/rhel7/python36_botocore-1.4.85/lib/python3.6/site-packages/botocore/retryhandler.py", line 223, in __call__ attempt_number, caught_exception) File "/jump/software/rhel7/python36_botocore-1.4.85/lib/python3.6/site-packages/botocore/retryhandler.py", line 359, in _check_caught_exception raise caught_exception File "/jump/software/rhel7/python36_botocore-1.4.85/lib/python3.6/site-packages/botocore/endpoint.py", line 204, in _get_response proxies=self.proxies, timeout=self.timeout) File "/jump/software/rhel7/python36_botocore-1.4.85/lib/python3.6/site-packages/botocore/vendored/requests/sessions.py", line 573, in send r = adapter.send(request, **kwargs) File "/jump/software/rhel7/python36_botocore-1.4.85/lib/python3.6/site-packages/botocore/vendored/requests/adapters.py", line 370, in send timeout=timeout File "/jump/software/rhel7/python36_botocore-1.4.85/lib/python3.6/site-packages/botocore/vendored/requests/packages/urllib3/connectionpool.py", line 544, in urlopen body=body, headers=headers) File "/jump/software/rhel7/python36_botocore-1.4.85/lib/python3.6/site-packages/botocore/vendored/requests/packages/urllib3/connectionpool.py", line 349, in _make_request conn.request(method, url, **httplib_request_kw) File "/jump/software/rhel7/Python-3.6.0/lib/python3.6/http/client.py", line 1239, in request self._send_request(method, url, body, headers, encode_chunked) TypeError: _send_request() takes 5 positional arguments but 6 were given Here is the simple code: import boto3 access_key = "<access key>" secret_key = "<secret key>" gateway = "http://carf-ceph-osd15" s3 = boto3.client('s3', 'us-east-1', aws_access_key_id=access_key, aws_secret_access_key=secret_key, endpoint_url=gateway, use_ssl=False ) # config=boto3.session.Config(signature_version='s3v2') for bucket in s3.list_buckets(): for key in bucket.objects.all(): print(key.key) Thanks in advance for any help!! -Bryan -----Original Message----- Note: External Email ------------------------------------------------- Bryan Banister <bbanister@xxxxxxxxxxxxxxx> writes: > Hello, > > I have the boto python API working with our ceph cluster but haven't figured out a way to get boto3 to communicate yet to our RGWs. Anybody have a simple example? I just use the client interface as described in http://boto3.readthedocs.io/en/latest/reference/services/s3.html so something like:: s3 = boto3.client('s3','us-east-1', endpoint_url='http://<rgw>', aws_access_key_id = 'access', aws_secret_access_key = 'secret') s3.create_bucket(Bucket='foobar') s3.put_object(Bucket='foobar',Key='foo',Body='foo') -- Abhishek Lekshmanan SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
Note: This email is for the confidential use of the named addressee(s) only and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you are hereby notified that any review, dissemination or copying of this email is strictly prohibited, and to please notify the sender immediately and destroy this email and any attachments. Email transmission cannot be guaranteed to be secure or error-free. The Company, therefore, does not make any guarantees as to the completeness or accuracy of this email or any attachments. This email is for informational purposes only and does not constitute a recommendation, offer, request or solicitation of any kind to buy, sell, subscribe, redeem or perform any type of transaction of a financial product. |
_______________________________________________ ceph-users mailing list ceph-users@xxxxxxxxxxxxxx http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com