jugaad-data icon indicating copy to clipboard operation
jugaad-data copied to clipboard

Not able to retrieve bhavcopy from 8th July 2024

Open ElisonSherton opened this issue 1 year ago • 7 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

ElisonSherton avatar Jul 13 '24 03:07 ElisonSherton

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

kushal-goenka avatar Jul 14 '24 04:07 kushal-goenka

Thanks for the update!

ElisonSherton avatar Jul 14 '24 10:07 ElisonSherton

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?

dkafka-sounak avatar Aug 12 '24 06:08 dkafka-sounak

Any luck or workaround for this issue ?

SanjibBanerjee avatar Sep 17 '24 01:09 SanjibBanerjee

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 ?

SanjibBanerjee avatar Sep 17 '24 01:09 SanjibBanerjee

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

kushal-goenka avatar Sep 17 '24 17:09 kushal-goenka

Hey .. is this issue addressed in recent code?

vidhyadharpandit avatar Jan 01 '25 13:01 vidhyadharpandit