jugaad-py/jugaad-data

zipfile.BadZipFile: File is not a zip file for bhavcopy_fo_save

Closed this issue · 1 comments

Traceback (most recent call last):
  File "/home/mb/my/career/market/bhav/setup.py", line 8, in <module>
    bhavcopy_fo_save(date(2021,7,20), ".")
  File "/home/mb/my/career/market/bhav/venv/lib/python3.9/site-packages/jugaad_data/nse/archives.py", line 120, in bhavcopy_fo_save
    text = self.bhavcopy_fo_raw(dt)
  File "/home/mb/my/career/market/bhav/venv/lib/python3.9/site-packages/jugaad_data/nse/archives.py", line 13, in unzipper
    with zipfile.ZipFile(file=fp) as zf:
  File "/usr/lib/python3.9/zipfile.py", line 1257, in __init__
    self._RealGetContents()
  File "/usr/lib/python3.9/zipfile.py", line 1324, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

Please share the code snippet and error