[docs] Possible bug in zipfile when opening zip file from external drive

Nick Weppenaar weppenaar at gmail.com
Thu Nov 15 15:25:13 CET 2012


Hello.


I would like to report a possible bug. I'm using zipfile to extract files
from a zip repository. When I try to open the zip repository, I hit an
error message from lines 173-174 in zipfile.py:


if diskno != 0 or disks != 1:

    raise BadZipfile("zipfiles that span multiple disks are not supported")


The problem is that it's not a multi-disk zipfile. When I try to open it
with anything else (7-zip, windows), it works fine. I think the problem
could be that the zipfile was created on an external harddrive and hits a
snag on the first part of the check. I don't know exactly what diskno is,
but I guess that it relates to the order of the disk in the system. Anyway,
it I comment out those two lines, zipfile extracts the files without any
problems.


My suggestion is to separate out the two checks and make sure that zipfiles
created on external drives (if that's the cause of the problem) can be
extracted.


Thank you.


Nick Weppenaar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20121115/2cf9a528/attachment.html>


More information about the docs mailing list