I am getting JSONDecodeError: Expecting value error while trying to download equity historical data
NSEPython
NSEPython is a Python wrapper created to scrap the NSEIndia APIs. It is an educational project.
Use appropriate threads for -
Documentation
Feature Request
Bug Reporting
Link: NSE Python - Unofficed
dexter
October 25, 2024, 3:23pm
2
Write some more details.
Like you are in PC or⌠ServerâŚ
SpecsâŚ
system specs you want to know �
dexter
October 25, 2024, 5:14pm
5
Tell the OS. Always tell the OS. It helps.
Windows 11 home
python version
this is the program which i am using and have attached the ss for you reference, please help me to sort out this
import nselib
import pandas
from nsepython import *
tickers = 'INFY'
start_date = "01-03-2024"
end_date = "07-06-2024"
with pd.ExcelWriter('D:/data.xlsx', engine='xlsxwriter') as writer:
for ticker in tickers:
stock_data = equity_history(ticker,'EQ',start_date,end_date)
stock_data.to_excel(writer, sheet_name=ticker)
print('Done')
more interestingly this error only occurs while fetching the equity histororical data, working good with indices historical fetching.
tickers = âNIFTY 50â, âNIFTY AUTOâ,âNIFTY BANKâ,âNIFTY FMCGâ,âNIFTY ITâ,âNIFTY MEDIAâ,âNIFTY METALâ,âNIFTY PHARMAâ,âNIFTY PSU BANKâ,âNIFTY REALTYâ,âNIFTY OIL AND GASâ
start_date = â01-Mar-2024â
end_date = â07-Jun-2024â
with pd.ExcelWriter(âE:/FinAnalysis/Nifty NSE Sectoral Indices/NiftySectorReturn.xlsxâ, engine=âxlsxwriterâ) as writer:
for ticker in tickers:
stock_data = index_history(ticker,start_date,end_date)
stock_data.to_excel(writer, sheet_name=ticker)
1 Like
same thing happening with me. were you able to solve it?
dexter
October 26, 2024, 9:50am
10
I will update the patch for NSEPythonâs Local Edition.
For some reason, the current NSE Update only affected the persons using âWindowsâ computer
See everything I update and fix something I must ensure it is not screwing up with something that is already workingâŚ
yes even iâm on windows.
thanks for the update. cheers.
thanks alot. working. so i had a noob question. i have a script that scrapes FNO stocks data. yesterday i ran the same script on google colab with nsepythonserver and it completed the task in 1/5th the time. was just curious as to why that was faster than running the same script locally. i would like to apologize in advance if this question is too basic but Iâm a complete noob. TIA.
dexter
October 28, 2024, 8:02am
15
They turned off gzip compression for Windows People. So some of their engineers have fucked up.