![]() Return ('utf-8') File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode X.filename = x._decodeFilename() File "/usr/lib/python2.7/zipfile.py", line 379, in _decodeFilename Self._RealGetContents() File "/usr/lib/python2.7/zipfile.py", line 859, in _RealGetContents When I run the above script i get the following exception: Traceback (most recent call last): File "./temp.py", line 9, in įz = zipfile.ZipFile(f, 'r') File "/usr/lib/python2.7/zipfile.py", line 770, in _init_ The zipfile itself doesn't contain any non-ASCII characters but the file inside it does. This seems to be causing the zipfile module to barf. zip file which contains a file which seems to have Chinese characters in its name. I'm trying to use a python script to download files from a Chinese service provider (I'm not from China myself). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |