Aws-cli: Sync to s3 hangs forever - 'ascii' codec can't encode character

Created on 29 Jul 2017  路  2Comments  路  Source: aws/aws-cli

Think I'm experiencing an issue similar to #2575 attempting to sync from my Mac's local filesystem to s3:

UnicodeEncodeError: 'ascii' codec can't encode character u'\u0303' in position 11: ordinal not in range(128)
2017-07-29 00:49:40,775 - Thread-1 - awscli.customizations.s3.results - DEBUG - Error processing result QueuedResult(transfer_type='upload'

Traceback (most recent call last):
File "/Users/jasonsturges/Library/Python/2.7/lib/python/site-packages/awscli/customizations/s3/results.py", line 604, in _process_result
    result_handler(result)
File "/Users/jasonsturges/Library/Python/2.7/lib/python/site-packages/awscli/customizations/s3/results.py", line 241, in __call__
    result=result)
File "/Users/jasonsturges/Library/Python/2.7/lib/python/site-packages/awscli/customizations/s3/results.py", line 267, in _record_queued_result
    self._get_ongoing_dict_key(result)] = total_transfer_size
File "/Users/jasonsturges/Library/Python/2.7/lib/python/site-packages/awscli/customizations/s3/results.py", line 250, in _get_ongoing_dict_key
    str(el) for el in [result.transfer_type, result.src, result.dest])
File "/Users/jasonsturges/Library/Python/2.7/lib/python/site-packages/awscli/customizations/s3/results.py", line 250, in <genexpr>
    str(el) for el in [result.transfer_type, result.src, result.dest])

Without the --debug option, it appears to hang forever at "0 files", repeatedly trying the same operations while pummeling the network.

Within the folder I'm attempting to sync, there's a folder with the 'n虄' character in the name.

Sync command is simply:

aws s3 sync . s3://[bucket]/

Strange, as this folder exists in s3 - though I can't recall, it is possible that I initially uploaded it using the aws cp command instead of sync in the past.

Also strange is that adding --dryrun with sync works perfectly fine, correctly indicating a list of files to be uploaded.

Versions:

  • aws-cli/1.11.94 Python/2.7.10 Darwin/15.6.0 botocore/1.5.57
  • OS X El Capitan (10.11.6)
bug unicode

Most helpful comment

Thanks for the report! I've got a fix up for the unicode issue.

All 2 comments

Thanks for the report! I've got a fix up for the unicode issue.

I just had similar issue, using zsh terminal.
Solution was to use bash terminal instead, just in case it can help anyone ...

Was this page helpful?
0 / 5 - 0 ratings