You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to extract a .zip containing filenames with non-ascii characters, the extract module returns an error:
Traceback (most recent call last):
File "/extract.py", line 31, in <module>
with libarchive.public.file_reader(target, passphrases=password_candidates) as ar:
File "/usr/local/lib/python3.7/contextlib.py", line 112, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.7/site-packages/libarchive/adapters/archive_read.py", line 295, in _enumerator
opener(archive_res)
File "/usr/local/lib/python3.7/site-packages/libarchive/adapters/archive_read.py", line 318, in opener
_archive_read_open_filename(archive_res, filepath, block_size)
File "/usr/local/lib/python3.7/site-packages/libarchive/adapters/archive_read.py", line 74, in _archive_read_open_filename
filepath = filepath.encode(_ASCII_ENCODING)
UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 35: ordinal not in range(128)
The text was updated successfully, but these errors were encountered:
Augustin-FL
changed the title
Error with the zip module when filenames have non-ascii characters
Error with the extract module when filenames have non-ascii characters
Feb 16, 2023
When trying to extract a .zip containing filenames with non-ascii characters, the extract module returns an error:
The error seems to be caused by dsoprea/PyEasyArchive#52
The text was updated successfully, but these errors were encountered: