Can't deal with Chinese character file path

Anonymous avatarAnonymous created an issue

RT. The file path includes Chinese character, Display error in my logs. The error message as:

[2012-10-08 14:01:43,821: ERROR/MainProcess] Task app.tasks.compress_file[884932db-5755-4575-bfcd-2caf4f793e4f] raised exception: UnicodeEncodeError('ascii', u'/<FILE PATH>/images/\u5f52\u6863_2.zip', 54, 56, 'ordinal not in range(128)') Traceback (most recent call last): File "/<FILE PATH>/env/lib/python2.6/site-packages/celery/task/trace.py", line 224, in trace_task R = retval = fun(*args, kwargs) File "/<FILE PATH>/tasks.py", line 15, in compress_file p = Path(compress.content.path) File "/<FILE PATH>/env/lib/python2.6/site-packages/unipath/abstractpath.py", line 41, in new return _base.new(class_, newpath)

Comments (1)

  1. Mike Orr

    I don't have enough knowledge of Chinese charsets to address this. Development has moved to https://github.com/mikeorr/Unipath . Also, I'm considering freezing Unipath in favor of pathlib (PEP 428). If you think this is still a significant issue, open a bug report in the Bitbucket repository, and explain how somebody with no experience in Asian languages can troubleshoot this.

  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.