[issue24877] Bad Password for file using zipfile module

shiva prasanth report at bugs.python.org
Mon Aug 17 02:53:47 CEST 2015


shiva prasanth added the comment:

Python 2.7.9 (default, Apr  2 2015, 15:33:21) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import zipfile
>>> s=zipfile.ZipFile('random.zip')
>>> s.extractall(pwd='getlost')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/zipfile.py", line 1040, in extractall
    self.extract(zipinfo, path, pwd)
  File "/usr/lib/python2.7/zipfile.py", line 1028, in extract
    return self._extract_member(member, path, pwd)
  File "/usr/lib/python2.7/zipfile.py", line 1082, in _extract_member
    with self.open(member, pwd=pwd) as source, \
  File "/usr/lib/python2.7/zipfile.py", line 1007, in open
    raise RuntimeError("Bad password for file", name)
RuntimeError: ('Bad password for file', <zipfile.ZipInfo object at 0x7faf1d1921e0>)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24877>
_______________________________________


More information about the Python-bugs-list mailing list