This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author markhirota
Recipients alanmcintyre, arkanes, georg.brandl, markhirota
Date 2008-09-16.21:53:30
SpamBayes Score 4.784263e-06
Marked as misclassified No
Message-id <>
I'd like to piggyback on this issue if okay :D

I have some zipfiles I'm working with that contain junk in the extra 
fields. The ZipFile object croaks at the call to the 
ZipInfo._decodeExtra() call when it could really just ignore the error.

Example of traceback:

>>> zf = zipfile.ZipFile('', 'r')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "", line 346, in __init__
  File "", line 366, in _GetContents
  File "", line 424, in _RealGetContents
  File "", line 267, in _decodeExtra
    tp, ln = unpack('<hh', extra[:4])
  File "/usr/lib/python2.5/", line 87, in unpack
    return o.unpack(s)
struct.error: unpack requires a string argument of length 4

While I'm working to track down the source of the "extra junk" -- this 
type of error falls into the same category: Python zipfile hits an 
issue that most zip tools are fine with.
Date User Action Args
2008-09-16 21:54:23markhirotasetrecipients: + markhirota, georg.brandl, alanmcintyre, arkanes
2008-09-16 21:54:23markhirotasetmessageid: <>
2008-09-16 21:53:30markhirotalinkissue1757072 messages
2008-09-16 21:53:30markhirotacreate