[Python-bugs-list] [ python-Bugs-683061 ] gzip module cannot write large files
SourceForge.net
noreply@sourceforge.net
Sun, 30 Mar 2003 10:42:40 -0800
Bugs item #683061, was opened at 2003-02-08 12:52
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=683061&group_id=5470
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Ben Escoto (bescoto)
Assigned to: Nobody/Anonymous (nobody)
Summary: gzip module cannot write large files
Initial Comment:
Something like this:
import gzip
fin = open("/dev/urandom", "rb")
fout = gzip.GzipFile("out", "wb")
for i in range(4500): fout.write(fin.read(1024*1024))
fout.close()
will result in an error like:
Exception 'long int too large to convert to int' raised
of class 'exceptions.OverflowError':
...
File "/usr/local/lib/python2.2/gzip.py", line 253, in
close
write32(self.fileobj, self.size)
File "/usr/local/lib/python2.2/gzip.py", line 19, in
write32
output.write(struct.pack("<l", value))
Tested in python 2.2.1
----------------------------------------------------------------------
Comment By: Steven Taschuk (staschuk)
Date: 2003-03-30 11:42
Message:
Logged In: YES
user_id=666873
Current CVS has a fix for this, as of revision 1.37 (part of 2.3a1).
See patch 618135: http://www.python.org/sf/618135.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=683061&group_id=5470