I am getting an error on python2.6 on the following script that works fine in python2.7, is this something that is fixable?
(DM)vidar@berzerker:~$ python a.py
Traceback (most recent call last):
File "a.py", line 7, in <module>
prs.save('test.pptx')
File "/Users/vidar/.virtualenvs/DM/src/pptx/pptx/api.py", line 64, in save
return self.__package.save(path)
File "/Users/vidar/.virtualenvs/DM/src/pptx/pptx/presentation.py", line 125, in save
pkgng_pkg.save(path)
File "/Users/vidar/.virtualenvs/DM/src/pptx/pptx/packaging.py", line 134, in save
zipfs.write_element(cti.element, '/[Content_Types].xml')
File "/Users/vidar/.virtualenvs/DM/src/pptx/pptx/packaging.py", line 849, in write_element
if itemURI in self:
File "/Users/vidar/.virtualenvs/DM/src/pptx/pptx/packaging.py", line 687, in __contains__
return itemURI in self.itemURIs
File "/Users/vidar/.virtualenvs/DM/src/pptx/pptx/packaging.py", line 811, in itemURIs
zip = zipfile.ZipFile(self.path)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/zipfile.py", line 696, in __init__
self._GetContents()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/zipfile.py", line 716, in _GetContents
self._RealGetContents()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/zipfile.py", line 728, in _RealGetContents
raise BadZipfile, "File is not a zip file"
zipfile.BadZipfile: File is not a zip file
I am getting an error on python2.6 on the following script that works fine in python2.7, is this something that is fixable?
I can mitigate it with the fix in https://github.com/vidar/python-pptx/commit/3c87a0fd311c4f22a428877719638409cf4edd97 but that is obviously not a long term approach.
gives the following stacktrace: