From: Matt D. <ma...@do...> - 2014-02-23 13:53:13
|
1) what does your LANG= environment variable have in it? You could do LANG= $(date +"...") to not use a locale when generating the date string. 2) you could use a date format string that doesn't include unicode characters. That would clearly allow it to succeed. 3) 1.0.1 is very old, please try with the upstream master branch at github.com/s3tools/s3cmd. There's clearly a bug in 1.0.0 with respect to unicode file names in the put operation. Looking at the code, we may still have a problem in the put operation, even in current upstream. You might also try using 'sync' instead of 'put' - that codepath is more clear of unicode failures. Thanks, Matt On Sun, Feb 23, 2014 at 3:54 AM, Tomas Wisten <to...@sm...>wrote: > Hi! > > I get the following message when I run the script: > > ----------------- > komav_ff > creating /tmp/1393147730 - söndag 23 februari 2014 @ 1028 - > komav_ff.sql.gz > uploading... > > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > An unexpected error has occurred. > Please report the following lines to: > s3t...@li... > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > > Problem: UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' > in position 36: ordinal not in range(128) > S3cmd: 1.0.1 > > Traceback (most recent call last): > File "/usr/bin/s3cmd", line 2006, in <module> > main() > File "/usr/bin/s3cmd", line 1950, in main > cmd_func(args) > File "/usr/bin/s3cmd", line 330, in cmd_object_put > destination_base = str(destination_base_uri) > UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in > position 36: ordinal not in range(128) > > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > An unexpected error has occurred. > Please report the above lines to: > s3t...@li... > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > > ---------------- > > It doesn't upload anything to the S3 bucket. However, if I replace all ` > characters with the ' character, it does upload files - but the directory > name is: > > date +"%s - %A %d %B %Y @ %H%M" > > ...and the files in is have similar names. > > Do you have any tips regarding this? > > Thanks in advance! > > > Best regards, > > Tomas Wisten > in...@sm... > www.smidigwebbyra.se > > > > ------------------------------------------------------------------------------ > Managing the Performance of Cloud-Based Applications > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > Read the Whitepaper. > > http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk > |