BennyThadikaran/eod2

defs.defs - Failed to download holidays

Closed this issue · 2 comments

Hello Benny,

Getting the following error today (Mon Oct 14 ).

(.venv) saurabhgarg@MacBook-Pro src % python3 init.py
sh: color: command not found
WARNING: 14-10-2024 20:55 - defs.defs - Failed to download holidays - Expecting value: line 1 column 1 (char 0)

Thanks
Saurabh

Update nse package to latest. pip install -U nse to resolve the issue.

The http header for accept-encoding in nse package are set to gzip, brotli. These are compression formats. The requests library supports gzip by default but brotli requires an external library.

NSE servers used to prefer gzip compression but now prefers Brotli. I have removed Brotli from the headers, so data is returned in gzipped format.

Working fine now, Thanks B, Cheers !