soit-sk / slovakia_post_codes

Scraper for slovak mail service post codes.
https://morph.io/soit-sk/slovakia_post_codes
2 stars 3 forks source link

xlrd.biffh.XLRDError: Unsupported format, or corrupt file: Expected BOF record; found 'PK\x03\x04\x14\x00\x06\x00' #3

Closed hanecak closed 7 years ago

hanecak commented 7 years ago

After update of the scraper which takes into account renamed files (see 602cde0b) following erro popped-up:

Traceback (most recent call last):
  File "scraper.py", line 21, in <module>
    wb = xlrd.open_workbook(file_contents=archive.read(obce_filename))
  File "/app/.heroku/python/lib/python2.7/site-packages/xlrd/__init__.py", line 429, in open_workbook
    biff_version = bk.getbof(XL_WORKBOOK_GLOBALS)
  File "/app/.heroku/python/lib/python2.7/site-packages/xlrd/__init__.py", line 1545, in getbof
    bof_error('Expected BOF record; found %r' % self.mem[savpos:savpos+8])
  File "/app/.heroku/python/lib/python2.7/site-packages/xlrd/__init__.py", line 1539, in bof_error
    raise XLRDError('Unsupported format, or corrupt file: ' + msg)
xlrd.biffh.XLRDError: Unsupported format, or corrupt file: Expected BOF record; found 'PK\x03\x04\x14\x00\x06\x00'
katkad commented 7 years ago

fixed in https://github.com/soit-sk/slovakia_post_codes/commit/84ebb8a46a4c693fb8809d38aa5fead8d8145c88