Getting __init__() got an unexpected keyword argument 'max_bandwidth' when using aws cli to upload an object.
I upgraded s3transfer:
Requirement already up-to-date: s3transfer in /usr/local/lib/python3.6/site-packages
Collecting botocore<2.0.0,>=1.3.0 (from s3transfer)
Downloading botocore-1.8.34-py2.py3-none-any.whl (4.0MB)
100% |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅| 4.1MB 317kB/s
Requirement already up-to-date: jmespath<1.0.0,>=0.7.1 in /usr/local/lib/python3.6/site-packages (from botocore<2.0.0,>=1.3.0->s3transfer)
Requirement already up-to-date: docutils>=0.10 in /usr/local/lib/python3.6/site-packages (from botocore<2.0.0,>=1.3.0->s3transfer)
Requirement already up-to-date: python-dateutil<3.0.0,>=2.1 in /usr/local/lib/python3.6/site-packages (from botocore<2.0.0,>=1.3.0->s3transfer)
Requirement already up-to-date: six>=1.5 in /usr/local/lib/python3.6/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<2.0.0,>=1.3.0->s3transfer)
Installing collected packages: botocore
Found existing installation: botocore 1.8.33
Uninstalling botocore-1.8.33:
Successfully uninstalled botocore-1.8.33
Successfully installed botocore-1.8.34
aws --version
aws-cli/1.14.29 Python/3.6.4 Darwin/17.3.0 botocore/1.8.34
Good job
Can you include a copy of the traceback, as well as what version your s3transfer is?
@dstufft no point to close if there are issues.
What steps should i do to provide you version and traceback?
@gilv Are you still having troubles with this?
You can get more information about the error by providing the --debug
flag when calling aws
.
pip install --upgrade s3transfer
Requirement already up-to-date: s3transfer in /usr/lib/python2.7/site-packages
Requirement already up-to-date: futures<4.0.0,>=2.2.0; python_version == "2.6" or python_version == "2.7" in /usr/lib/python2.7/site-packages (from s3transfer)
Requirement already up-to-date: botocore<2.0.0,>=1.3.0 in /usr/lib/python2.7/site-packages (from s3transfer)
Requirement already up-to-date: jmespath<1.0.0,>=0.7.1 in /usr/lib/python2.7/site-packages (from botocore<2.0.0,>=1.3.0->s3transfer)
Requirement already up-to-date: docutils>=0.10 in /usr/lib/python2.7/site-packages (from botocore<2.0.0,>=1.3.0->s3transfer)
Requirement already up-to-date: python-dateutil<3.0.0,>=2.1 in /usr/lib/python2.7/site-packages (from botocore<2.0.0,>=1.3.0->s3transfer)
Requirement already up-to-date: six>=1.5 in /usr/lib/python2.7/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<2.0.0,>=1.3.0->s3transfer)
$ aws --version
aws-cli/1.14.47 Python/2.7.5 Linux/3.10.0-693.17.1.el7.x86_64 botocore/1.9.2
2018-03-01 12:59:11,112 - MainThread - botocore.client - DEBUG - Registering retry handlers for service: s3
2018-03-01 12:59:11,112 - MainThread - botocore.client - DEBUG - Defaulting to S3 virtual host style addressing with path style addressing fallback.
2018-03-01 12:59:11,113 - MainThread - awscli.clidriver - DEBUG - Exception caught in main()
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/awscli/clidriver.py", line 208, in main
return command_table[parsed_args.command](remaining, parsed_args)
File "/usr/lib/python2.7/site-packages/awscli/customizations/commands.py", line 190, in __call__
parsed_globals)
File "/usr/lib/python2.7/site-packages/awscli/customizations/commands.py", line 187, in __call__
return self._run_main(parsed_args, parsed_globals)
File "/usr/lib/python2.7/site-packages/awscli/customizations/s3/subcommands.py", line 698, in _run_main
return cmd.run()
File "/usr/lib/python2.7/site-packages/awscli/customizations/s3/subcommands.py", line 1016, in run
self._client, result_queue)
File "/usr/lib/python2.7/site-packages/awscli/customizations/s3/s3handler.py", line 84, in __call__
self._runtime_config)
File "/usr/lib/python2.7/site-packages/awscli/customizations/s3/transferconfig.py", line 119, in create_transfer_config_from_runtime_config
return TransferConfig(**kwargs)
TypeError: __init__() got an unexpected keyword argument 'max_bandwidth'
2018-03-01 12:59:11,114 - MainThread - awscli.clidriver - DEBUG - Exiting with rc 255
__init__() got an unexpected keyword argument 'max_bandwidth'
Fixed by downgrading CLI package:
pip install 'awscli==1.13.0' --force-reinstall
Closing due to inactivity.
Most helpful comment
Fixed by downgrading CLI package:
pip install 'awscli==1.13.0' --force-reinstall