From: SourceForge.net <no...@so...> - 2012-07-23 14:17:08
|
Bugs item #3547631, was opened at 2012-07-23 07:17 Message generated for change (Tracker Item Submitted) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=887015&aid=3547631&group_id=178907 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: s3cmd Group: Malfunction Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nomad () Assigned to: Nobody/Anonymous (nobody) Summary: s3cmd put/get with utf-8 characters in uri Initial Comment: Trying to "put" a file onto the s3bucket that contain non-ascii characters in the filename (sub-directory) cause crash # s3cmd put --encoding UTF-8 --no-progress --rr userLogs/Xxxxxxxxx/xxxaña/JXK4W4EWST7AMVAST2UUXNX85ATHQ6/app_2011_05_20.log s3://XXXXXXXX/userLogs/Xxxxxxxxx/xxxaña/JXK4W4EWST7AMVAST2UUXNX85ATHQ6/app_2011_05_20.log !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! An unexpected error has occurred. Please report the following lines to: s3t...@li... !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Problem: UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position 45: ordinal not in range(128) S3cmd: 1.1.0-beta2 Traceback (most recent call last): File "/usr/bin/s3cmd", line 1805, in <module> main() File "/usr/bin/s3cmd", line 1746, in main cmd_func(args) File "/usr/bin/s3cmd", line 255, in cmd_object_put destination_base = str(destination_base_uri) UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position 45: ordinal not in range(128) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! An unexpected error has occurred. Please report the above lines to: s3t...@li... !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I've currently "patched" my s3cmd as follow to allow to work; in s3cmd_put - destination_base = str(destination_base_uri) + destination_base = str(destination_base_uri.uri().encode(Config().encoding)) I had a similar error trying to get the file so here is the patch for this one. in /usr/lib/python2.6/site-packages/S3/FileLists.py compare_filelists - uri_str = str(uri) + uri_str = str(uri.uri().encode(cfg.encoding)) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=887015&aid=3547631&group_id=178907 |