s4cmd
s4cmd copied to clipboard
Unexpected 'certfile' argument
New error on my gccp instances getting data from s3 bucket.
user_name@instance~$ s4cmd -c32 get -r s3:/my-bucket/my-data/
[Exception] __init__() got an unexpected keyword argument 'cert_file'
[Thread Failure] __init__() got an unexpected keyword argument 'cert_file'
Never seen this before
Adding -p ~/.s3cfg doesn't solve it
Got same exception on Ubuntu Bionic. Strangely it seems, that neither of s4cmd, python-boto3 or python-botocore packages were upgraded since previous successful use, nor pip-version are installed on the system. Reproduced with just:
$ s4cmd ls
[Runtime Exception] __init__() got an unexpected keyword argument 'cert_file'
Traceback (most recent call last):
File "/usr/bin/s4cmd", line 1878, in <module>
CommandHandler(opt).run(args)
File "/usr/bin/s4cmd", line 1533, in run
CommandHandler.__dict__[cmd + '_handler'](self, args)
File "/usr/bin/s4cmd", line 136, in wrapper
ret = func(*args, **kargs)
File "/usr/bin/s4cmd", line 1604, in ls_handler
self.pretty_print(self.s3handler().list_buckets())
File "/usr/bin/s4cmd", line 136, in wrapper
ret = func(*args, **kargs)
File "/usr/bin/s4cmd", line 698, in list_buckets
for bucket in self.s3.list_buckets().get('Buckets') or []:
File "/usr/bin/s4cmd", line 406, in wrapped_method
ret = getattr(self.client, method)(*args, **merged_kargs)
File "/usr/lib/python2.7/dist-packages/botocore/client.py", line 324, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/lib/python2.7/dist-packages/botocore/client.py", line 609, in _make_api_call
operation_model, request_dict)
File "/usr/lib/python2.7/dist-packages/botocore/endpoint.py", line 143, in make_request
return self._send_request(request_dict, operation_model)
File "/usr/lib/python2.7/dist-packages/botocore/endpoint.py", line 172, in _send_request
success_response, exception):
File "/usr/lib/python2.7/dist-packages/botocore/endpoint.py", line 265, in _needs_retry
caught_exception=caught_exception, request_dict=request_dict)
File "/usr/lib/python2.7/dist-packages/botocore/hooks.py", line 227, in emit
return self._emit(event_name, kwargs)
File "/usr/lib/python2.7/dist-packages/botocore/hooks.py", line 210, in _emit
response = handler(**kwargs)
File "/usr/lib/python2.7/dist-packages/botocore/retryhandler.py", line 183, in __call__
if self._checker(attempts, response, caught_exception):
File "/usr/lib/python2.7/dist-packages/botocore/retryhandler.py", line 251, in __call__
caught_exception)
File "/usr/lib/python2.7/dist-packages/botocore/retryhandler.py", line 269, in _should_retry
return self._checker(attempt_number, response, caught_exception)
File "/usr/lib/python2.7/dist-packages/botocore/retryhandler.py", line 317, in __call__
caught_exception)
File "/usr/lib/python2.7/dist-packages/botocore/retryhandler.py", line 223, in __call__
attempt_number, caught_exception)
File "/usr/lib/python2.7/dist-packages/botocore/retryhandler.py", line 359, in _check_caught_exception
raise caught_exception
TypeError: __init__() got an unexpected keyword argument 'cert_file'