I'm using Info-Zip 2.3, as is a group whose files I'm trying to work with. However, I can't seem to get the zipfile module to interact with the files produced by Info-Zip. (The python file is used for illustration only, I'm trying to extract text index files from the archives the other group is producing). P:\>zip test.zip uthread9.py adding: uthread9.py (92 bytes security) (deflated 71%) P:\>unzip test.zip Archive: test.zip replace uthread9.py? [y]es, [n]o, [A]ll, [N]one, [r]ename: y inflating: uthread9.py >>> import zipfile >>> z = zipfile.ZipFile( 'p:\\test.zip', 'r', zipfile.ZIP_DEFLATED ) >>> s = z.read('uthread9.py' ) Traceback (innermost last): File "<interactive input>", line 1, in ? File "d:\bin\lang\py2\lib\zipfile.py", line 242, in read bytes = dc.decompress(bytes) error: Error -3 while decompressing: invalid stored block lengths >>> for key, value in z.filelist[0].__dict__.items(): ... print key, repr(value) ... internal_attr 1 create_system 11 flag_bits 0 file_size 47883 compress_type 8 compress_size 14084 file_offset 58 CRC 1697539815 volume 0 filename 'uthread9.py' header_offset 0 extract_version 20 external_attr -2118778848 create_version 23 comment '' reserved 0 date_time (2000, 11, 30, 22, 31, 10) extra 'SD\004\000\\\000\000\000UT\005\000\007}\033\':' Is this a known limitation? I don't see any notes in the source or documentation about it if it is. Have I managed to misuse the module in some way? I have tried the python code with both ZIP_DEFLATED and ZIP_STORED, with no change in the error. Thoughts appreciated, Mike __________________________________ Mike C. Fletcher Designer, VR Plumber http://members.home.com/mcfletch
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4