Skip to content

UnicodeDecodeError #847

@baiyanchun

Description

@baiyanchun

I used s3cmd command (the latest s3cmd code I use) to put a file named in Chinese, when I use s3cmd info bucket, An unexpected error has occurred. The following is my operation process and result.

1 Create a bucket
s3cmd mb s3://bucket
Bucket 's3://bucket/' created

2 Create a file named in Chinese
touch 中文.txt

3 Put file to s3://bucket
s3cmd put 中文.txt s3://bucket
upload: '中文.txt' -> 's3://bucket/中文.txt' [1 of 1]
0 of 0 0% in 0s 0.00 B/s done

4 Ls this file
s3cmd ls s3://bucket
2017-03-21 02:55 0 s3://bucket/中文.txt

5 Get bucket info
s3cmd info s3://bucket

The error message:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Invoked as: /usr/local/bin/s3cmd info s3://bucket
Problem: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 496: ordinal not in range(128)
S3cmd: 1.6.1
python: 2.7.6 (default, Oct 26 2016, 20:30:19)
[GCC 4.8.4]
environment LANG=en_US.UTF-8

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/s3cmd-1.6.1-py2.7.egg/EGG-INFO/scripts/s3cmd", line 2996, in
File "/usr/local/lib/python2.7/dist-packages/s3cmd-1.6.1-py2.7.egg/EGG-INFO/scripts/s3cmd", line 2915, in main
File "/usr/local/lib/python2.7/dist-packages/s3cmd-1.6.1-py2.7.egg/EGG-INFO/scripts/s3cmd", line 918, in cmd_info
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 496: ordinal not in range(128)

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions