jugaad-py/jugaad-data

Not able to retrieve bhavcopy from 8th July 2024

Opened this issue · 6 comments

Issue description

I use the package to extract bhavcopies using bhavcopy_save function but that raises an BadZipFile Error for all the dates starting from 8th July to 12th July (i.e. at the time of reporting this bug)

image

Example Code

from jugaad_data.nse import bhavcopy_save
from datetime import datetime
pth = bhavcopy_save(datetime(2024, 7, 12), ".")

Error snippet

---------------------------------------------------------------------------
BadZipFile                                Traceback (most recent call last)
<ipython-input-7-799f68c8fd92> in <cell line: 2>()
      1 from jugaad_data.nse import bhavcopy_save
----> 2 pth = bhavcopy_save(datetime(2024, 7, 12), ".")

3 frames
/usr/lib/python3.10/zipfile.py in _RealGetContents(self)
   1336             raise BadZipFile("File is not a zip file")
   1337         if not endrec:
-> 1338             raise BadZipFile("File is not a zip file")
   1339         if self.debug > 1:
   1340             print(endrec)

BadZipFile: File is not a zip file

The old format was decommissioned, there is a Unified Distilled File Format from 8th July onwards, UDiff. I've opened a PR for the same

Thanks for the update!

The old format was decommissioned, there is a Unified Distilled File Format from 8th July onwards, UDiff. I've opened a PR for the same

Can you tell me how can i find a workaround?

Any luck or workaround for this issue ?

The old format was decommissioned, there is a Unified Distilled File Format from 8th July onwards, UDiff. I've opened a PR for the same
any workaorund Kushal ?

I'm still waiting on that PR approval. I guess you could make the changes locally yourself, or use the fork in the meanwhile