danilop / yas3fs

YAS3FS (Yet Another S3-backed File System) is a Filesystem in Userspace (FUSE) interface to Amazon S3. It was inspired by s3fs but rewritten from scratch to implement a distributed cache synchronized by Amazon SNS notifications. A web console is provided to easily monitor the nodes of a cluster.
http://danilop.github.io/yas3fs
MIT License
640 stars 98 forks source link

Unsupported UTF-8 characters #184

Closed nodje closed 5 years ago

nodje commented 5 years ago

I get this error in debug mode when trying to list folder content containing file with Chinese char.:

Traceback (most recent call last):
  File "/root/ya3fs/venv/local/lib/python2.7/site-packages/yas3fs/fuse.py", line 425, in _wrapper
    return func(*args, **kwargs) or 0
  File "/root/ya3fs/venv/local/lib/python2.7/site-packages/yas3fs/fuse.py", line 613, in readdir
    fip.contents.fh):
  File "/root/ya3fs/venv/local/lib/python2.7/site-packages/yas3fs/fuse.py", line 892, in __call__
    ret = getattr(self, op)(path, *args)
  File "/root/ya3fs/venv/local/lib/python2.7/site-packages/yas3fs/__init__.py", line 1769, in readdir
    k.name = urllib.unquote_plus(str(k.name)).decode('utf-8')
UnicodeEncodeError: 'ascii' codec can't encode character u'\u5b89' in position 8: ordinal not in range(128)

It's odd because i've been able to create and subsequently read folder/file with name containing Chinese characters.

nodje commented 5 years ago

Forget it, it was an error occurring with the python2 pip version. This doesn't happen with the master branch version. And it's blazingly fast in comparison!