[ python-Bugs-1182788 ] ZipFile __del__/close problem with longint/long files

SourceForge.net noreply at sourceforge.net
Thu Apr 14 22:30:53 CEST 2005


Bugs item #1182788, was opened at 2005-04-14 03:10
Message generated for change (Comment added) made by alanmcintyre
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1182788&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Robert Kiendl (kxroberto)
Assigned to: Nobody/Anonymous (nobody)
Summary: ZipFile __del__/close problem with longint/long files

Initial Comment:
>From a user (py2.3.4 based app) I got only this small
trace:
I cannot reproduce it easily:

  --- sync complete: 6 files (0+6), 3488210kB copied. 
  --- 1795.9 Seconds (100.0% CPU Time) 
  Exception exceptions.OverflowError: 'long int too
large to convert to int' in <bound method
ZipFile.__del__ of <zipfile.ZipFile instance at
0x009D9D50>> ignored




----------------------------------------------------------------------

Comment By: Alan McIntyre (ESRG) (alanmcintyre)
Date: 2005-04-14 15:30

Message:
Logged In: YES 
user_id=1115903

Oh, silly me, I didn't notice this: "3488210kB copied,"
which is of course >2GB (don't know if your number indicates
pre- or post-compression though). I'm assuming this means
that you're bumping into the limits of the zip file format.

Since this sort of thing happens occasionally in some
applications I maintain, I will look at making a patch for
ZipFile that will at least tell you when you exceed file
format limits (either individual file size or total archive
file size).

----------------------------------------------------------------------

Comment By: Alan McIntyre (ESRG) (alanmcintyre)
Date: 2005-04-14 15:17

Message:
Logged In: YES 
user_id=1115903

How do you reproduce it?  I have seen that exception pop up
when trying to add a file >2GB to an archive (although in
that case it occurred during the call to ZipFile.write
rather than __del__).  It looks to me like writing the
end-of-zip-archive record - during close(), which is called
by __del__() -  would give this exception if the contents of
the archive were > 2GB, but I haven't tried this out to be
sure.  If that's what's causing the problem, then it would
appear to me that it's just a limitation of the ZIP file
format, but maybe the ZipFile object could detect this and
raise a less cryptic exception.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1182788&group_id=5470


More information about the Python-bugs-list mailing list