Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Error in s3cfg parser for add_headers in config file when using the : character #1087

@fviard

Description

@fviard

Issue from Roland Dunker on sourceforge:
https://sourceforge.net/p/s3tools/bugs/182/

Error in s3cfg parser for add_headers

Hello,

I tried to use s3cmd with “Server Side Encryption with KMS managed key” and add the value “add_headers = x-amz-server-side-encryption:aws:kms” in .s3cfg. When I try to upload a file I got following Error:

DEBUG: Unicodising '/usr/bin/s3cmd' using UTF-8
DEBUG: Unicodising 'put' using UTF-8
DEBUG: Unicodising 'information.xml.1' using UTF-8
DEBUG: Unicodising 's3://obs-1000026418-sapfics-poc-backup/' using UTF-8
DEBUG: Unicodising '--debug' using UTF-8
Invoked as: /usr/bin/s3cmd put information.xml.1 s3://obs-1000026418-sapfics-poc-backup/ --debug
Problem: ValueError: too many values to unpack
S3cmd: 2.0.0
python: 2.7.13 (default, Jan 11 2017, 10:56:06) [GCC]
environment LANG=en_US.UTF-8

Traceback (most recent call last):
File "/usr/bin/s3cmd", line 2996, in
rc = main()
File "/usr/bin/s3cmd", line 2719, in main
cfg = Config(options.config, options.access_key, options.secret_key, options.access_token)
File "/usr/lib/python2.7/site-packages/S3/Config.py", line 156, in init
self.read_config_file(configfile)
File "/usr/lib/python2.7/site-packages/S3/Config.py", line 287, in read_config_file
(key, value) = option.split(':')
ValueError: too many values to unpack

The command option s3cmd --add-header=x-amz-server-side-encryption:aws:kms works.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions