[New-bugs-announce] [issue9172] zipfile.extractall always raises an OSError after successfully unzipping all files

Andrew Miller report at bugs.python.org
Mon Jul 5 20:37:11 CEST 2010


New submission from Andrew Miller <aymill at gmail.com>:

Tried it with a variety of unencrypted zips. Zipped with WinZip 11.1. Looks like it tries to unzip a second time after it completes the first unzip.

Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) 
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from zipfile import ZipFile
>>> zip = ZipFile("example_1.zip")
>>> zip.extractall()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/zipfile.py", line 935, in extractall
    self.extract(zipinfo, path, pwd)
  File "/usr/lib/python2.6/zipfile.py", line 923, in extract
    return self._extract_member(member, path, pwd)
  File "/usr/lib/python2.6/zipfile.py", line 960, in _extract_member
    os.mkdir(targetpath)
OSError: [Errno 17] File exists: '/home/andy/projects/codedropvalidator/testdata/example'
>>>

----------
files: example_1.zip
messages: 109346
nosy: aymill
priority: normal
severity: normal
status: open
title: zipfile.extractall always raises an OSError after successfully unzipping all files
type: behavior
Added file: http://bugs.python.org/file17873/example_1.zip

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


More information about the New-bugs-announce mailing list