[New-bugs-announce] [issue24621] zipfile.BadZipFile: File is not a zip file
Yasar Luqman Ahmed
report at bugs.python.org
Sun Jul 12 21:24:01 CEST 2015
New submission from Yasar Luqman Ahmed:
I have a zip-file that can be opened/extracted with 7zip but gives an error when I try work with it in python:
Py2 (2.7.3 / Linux/Debian7):
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/zipfile.py", line 714, in __init__
self._GetContents()
File "/usr/lib/python2.7/zipfile.py", line 748, in _GetContents
self._RealGetContents()
File "/usr/lib/python2.7/zipfile.py", line 763, in _RealGetContents
raise BadZipfile, "File is not a zip file"
zipfile.BadZipfile: File is not a zip file
Py3 (3.4.3 / Windows 7 /64bit):
Traceback (most recent call last):
File "<pyshell#20>", line 1, in <module>
badzip = ZipFile(bad)
File "C:\Python34\lib\zipfile.py", line 937, in __init__
self._RealGetContents()
File "C:\Python34\lib\zipfile.py", line 978, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
The zip-file is attached.
----------
components: Library (Lib)
files: not_working.zip
messages: 246662
nosy: Yasar Luqman Ahmed
priority: normal
severity: normal
status: open
title: zipfile.BadZipFile: File is not a zip file
type: behavior
versions: Python 2.7, Python 3.4
Added file: http://bugs.python.org/file39915/not_working.zip
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24621>
_______________________________________
More information about the New-bugs-announce
mailing list