BadZipfile "file is not a zip file"
"Martin v. Löwis"
martin at v.loewis.de
Fri Jan 9 09:30:17 CET 2009
> What would cause a zip file to not have a table of contents?
AFAICT, _EndRecData is failing to find the "end of zipfile" structure in
the file. You might want debug through it to see where it looks, and how
it decides that this structure is not present in the file. Towards
22 bytes before the end of the file, the bytes PK\005\006 should appear.
If they don't appear, you don't have a zipfile. If they appear, but
elsewhere towards the end of the file, there might be a bug in the
zip file module (or, more likely, the zip file uses an optional zip
feature which the module doesn't implement).
More information about the Python-list