[CentralOH] Python 2.5.1 / Ubuntu 7.10 problem with .zip file
William McVey
wam at cisco.com
Thu Mar 6 22:07:55 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
More information about the CentralOH
mailing list