memory error with zipfile module

Hari Sekhon sekhon.hari at googlemail.com
Fri May 19 13:37:33 CEST 2006


I do

import zipfile
zip=zipfile.ZipFile('d:\somepath\cdimage.zip')
zip.namelist()
['someimage.iso']

then either of the two:

A)   file('someimage.iso','w').write(zip.read('someimage.iso'))
or
B)   content=zip.read('someimage.iso')

but both result in the same error:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "D:\u\Python24\lib\zipfile.py", line 357, in read
    bytes = dc.decompress(bytes)
MemoryError

I thought python was supposed to handle memory for you?

The python zipfile module is obviously broken...


Any advise?




More information about the Python-list mailing list