Invoked as: /usr/bin/s3cmd put --config=/var/www/html/.s3cfg --no-check-md5 --skip-existing --no-encrypt -P -H -p --add-header=Expires:Fri, 10 Apr 2015 13:47:49 GMT --add-header=Cache-Control:max-age=31536000, public /source/imgs/2014/04/397x200_1397137668_Taiw??n.JPG s3://bucket/destinationpath/
Problem: UnicodeEncodeError: 'ascii' codec can't encode characters in position 59-60: ordinal not in range(128)
S3cmd:   1.5.0-beta1
python:   2.6.8 (unknown, Mar 14 2013, 09:31:22)
[GCC 4.6.2 20111027 (Red Hat 4.6.2-2)]
environment LANG=C

Traceback (most recent call last):
  File "/usr/bin/s3cmd", line 2422, in <module>
    main()
  File "/usr/bin/s3cmd", line 2344, in main
    cmd_func(args)
  File "/usr/bin/s3cmd", line 306, in cmd_object_put
    local_list, single_file_local, exclude_list = fetch_local_list(args, is_src = True)
  File "/usr/lib/python2.6/site-packages/S3/FileLists.py", line 301, in fetch_local_list
    if uri.isdir() and not recursive:
  File "/usr/lib/python2.6/site-packages/S3/S3Uri.py", line 159, in isdir
    return os.path.isdir(self.path())
  File "/usr/lib64/python2.6/genericpath.py", line 41, in isdir
    st = os.stat(s)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 59-60: ordinal not in range(128)



On Thu, Apr 10, 2014 at 9:20 PM, Matt Domsch <matt@domsch.com> wrote:
Can you send the rest of the error report?  There should have been a traceback included.  I can't reproduce this on Fedora 20 (python 2.7) or RHEL 5 (python 2.4).  What OS version and python version do you have please?

Thanks,
Matt



On Thu, Apr 10, 2014 at 9:00 PM, Shawn Crowe <shawn@doap.com> wrote:
I'm still seeing some errors after updating..

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    An unexpected error has occurred.
  Please try reproducing the error using
  the latest s3cmd code from the git master
  branch found at:
  If the error persists, please report the
  following lines (removing any private
  info as necessary) to:

You have encountered a UnicodeEncodeError.  Your environment
variable LANG=C may not specify a Unicode encoding (e.g. UTF-8).
Please set LANG=en_US.UTF-8 or similar in your environment before
invoking s3cmd.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Invoked as: /usr/bin/s3cmd put --config=/source/.s3cfg --no-check-md5 --skip-existing --no-encrypt -P -H -p --add-header=Expires:Fri, 10 Apr 2015 13:47:49 GMT --add-header=Cache-Control:max-age=31536000, public /source/imgs/2014/04/397x200_1397137668_Taiw??n.JPG s3://bucket/destinationpath/

Environment variable is:
LANG=en_US.UTF-8

Original filename is:
397x200_1397137668_Taiwán.JPG

Any suggestions?

Thanks,
Shawn

On Sat, Apr 5, 2014 at 11:56 AM, Matt Domsch <matt@domsch.com> wrote:
I think this was fixed this last week in upstream
github.com/s3tools/s3cmd master branch - specifically, uploading
content using 'put' where the filename is UTF-8-encoded unicode.

Thanks,
Matt

On Sat, Apr 5, 2014 at 8:06 AM, Shawn Crowe <shawn@doap.com> wrote:
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>
> Problem: UnicodeEncodeError: 'ascii' codec can't encode characters in
> position 83-84: ordinal not in range(128)
> S3cmd:   1.5.0-alpha3
>
> Traceback (most recent call last):
>   File "/usr/bin/s3cmd", line 2094, in <module>
>     main()
>   File "/usr/bin/s3cmd", line 2034, in main
>     cmd_func(args)
>   File "/usr/bin/s3cmd", line 274, in cmd_object_put
>     local_list, single_file_local = fetch_local_list(args)
>   File "/usr/lib/python2.6/site-packages/S3/FileLists.py", line 240, in
> fetch_local_list
>     if uri.isdir() and not recursive:
>   File "/usr/lib/python2.6/site-packages/S3/S3Uri.py", line 158, in isdir
>     return os.path.isdir(self.path())
>   File "/usr/lib64/python2.6/genericpath.py", line 41, in isdir
>     st = os.stat(s)
> UnicodeEncodeError: 'ascii' codec can't encode characters in position 83-84:
> ordinal not in range(128)
>
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>     An unexpected error has occurred.
>     Please report the above lines to:
>    s3tools-bugs@lists.sourceforge.net
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>
> ------------------------------------------------------------------------------
>