This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients serhiy.storchaka
Date 2020-06-21.20:08:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
When open a ZIP archive, write a file with non-ascii name in it, and, not closing the archive, read that file back, it fails:

>>> import zipfile
>>> with zipfile.ZipFile('', 'w') as zf:
...     zf.writestr('йцукен', '')
Traceback (most recent call last):
  File "<stdin>", line 3, in <module>
  File "/usr/lib/python3.8/", line 1440, in read
    with, "r", pwd) as fp:
  File "/usr/lib/python3.8/", line 1521, in open
    raise BadZipFile(
zipfile.BadZipFile: File name in directory 'йцукен' and header b'\xd0\xb9\xd1\x86\xd1\x83\xd0\xba\xd0\xb5\xd0\xbd' differ.
Date User Action Args
2020-06-21 20:08:04serhiy.storchakasetrecipients: + serhiy.storchaka
2020-06-21 20:08:04serhiy.storchakasetmessageid: <>
2020-06-21 20:08:04serhiy.storchakalinkissue41068 messages
2020-06-21 20:08:03serhiy.storchakacreate