CityOfPhiladelphia / open-budget-data-transformer

Master repo of data cleanup scripts for the various budget cycles
1 stars 1 forks source link

FY18-proposed: File is not a zip file #9

Closed timwis closed 7 years ago

timwis commented 7 years ago

When I try running python parse_docx.py input/FY18.docx from within the virtual environment, I get the following error:

Traceback (most recent call last):
  File "parse_docx.py", line 23, in <module>
    budget_doc = docx2txt.process(f)
  File "/Users/tim/Sites/open-budget-data-transformer/FY18-proposed/venv/lib/python3.5/site-packages/docx2txt/docx2txt.py", line 76, in process
    zipf = zipfile.ZipFile(docx)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/zipfile.py", line 1026, in __init__
    self._RealGetContents()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/zipfile.py", line 1093, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
VitoWSalerno commented 7 years ago

Hmm. It should be a zip file. Maybe try the one Anna sent us that's in your email? Maybe I somehow miscopied it. Does it open in word?

On Mar 2, 2017 7:36 AM, "Tim Wisniewski" notifications@github.com wrote:

When I try running python parse_docx.py input/FY18.docx from within the virtual environment, I get the following error:

Traceback (most recent call last): File "parse_docx.py", line 23, in budget_doc = docx2txt.process(f) File "/Users/tim/Sites/open-budget-data-transformer/FY18-proposed/venv/lib/python3.5/site-packages/docx2txt/docx2txt.py", line 76, in process zipf = zipfile.ZipFile(docx) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/zipfile.py", line 1026, in init self._RealGetContents() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/zipfile.py", line 1093, in _RealGetContents raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CityOfPhiladelphia/open-budget-data-transformer/issues/9, or mute the thread https://github.com/notifications/unsubscribe-auth/AAI2QTUabYAXoa5q937M1xg9epZRNfwJks5rhrfkgaJpZM4MQ7wj .