jugaad-py / jugaad-data

Download live and historical data for Indian stock market
https://marketsetup.in/documentation/jugaad-data/
372 stars 147 forks source link

Not able to retrieve bhavcopy from 8th July 2024 #81

Open ElisonSherton opened 3 months ago

ElisonSherton commented 3 months ago

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
kushal-goenka commented 3 months ago

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

ElisonSherton commented 3 months ago

Thanks for the update!

dkafka-sounak commented 2 months ago

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?

SanjibBanerjee commented 1 month ago

Any luck or workaround for this issue ?

SanjibBanerjee commented 1 month ago

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 ?

kushal-goenka commented 1 month ago

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