[CentralOH] Python 2.5.1 / Ubuntu 7.10 problem with .zip file

Dean Stautberg dstautberg at gmail.com
Fri Mar 7 14:59:31 CET 2008

> On Thu, 2008-03-06 at 13:22 -0500, Mark Erbaugh wrote:
> > I am working on an application that uses .zip files as part of an
> > automatic update process. Since Python 2.3, Python has been able
> > to read files from a .zip file.  I've done most of the development with
> > Python 2.4.3 under Ubuntu 6.06.  Today, I tried running the application
> > under Python 2.5.1 with Ubuntu 7.10. It is unable to read either of
> > the .zip files that the program uses for updates.
> Can you test your .zip file with:
>         python -m zipfile -t YOUR_FILENAME.zip
> and list it with:
>         python -m zipfile -l YOUR_FILENAME.zip
> If so, the problem is likely to not be in python's zipfile library or in
> your zip file but in your application code. If either of the zipfile
> invocations above fails, then you're likely to be dealing with a zip
> file that is possibly corrupt or utilizes a slightly
> different/incompatible version of the zip file specification. In which
> case, does winzip or the unix unzip command successfully extract the
> file? Are you able to create the zip with contents that can be shared to
> allow other people to debug it or the std lib?
>   -- William

I throw in a suggestion since this has bitten me before: if perchance you
are using python code to copy the zip file, make sure you use the binary
option.  Reading or writing a zip file as text can cause it to get

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/mailman/private/centraloh/attachments/20080307/444a2db9/attachment.htm 

More information about the CentralOH mailing list