I am using the Code:
import yfinance as yf
Infosys = yf.Ticker("INFY.BO")
print(Infosys.info.keys())
Till here I am getting an output. But I am getting an error in the below-mentioned code:
Infosys.history(period="5mo")
Error:
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I am unable to understand it, please help!!
I got the same :-(
another solution: #868 :D
I am using the Code:
import yfinance as yf Infosys = yf.Ticker("INFY.BO") print(Infosys.info.keys())Till here I am getting an output. But I am getting an error in the below-mentioned code:
Infosys.history(period="5mo")Error:
JSONDecodeError: Expecting value: line 1 column 1 (char 0)I am unable to understand it, please help!!
Hey,
Upgrade your yfinance version. It worked for me after that.
pip install yfinance --upgrade
yfinance==0.1.62 solves the problem.
Same error with python 3.8 and 0.1.63 ... :( simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
same error, but when i deploy my app on heroku its not get error (simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0). I don't know why its different
Consolidating to #867.
Most helpful comment
Hey,
Upgrade your yfinance version. It worked for me after that.
yfinance==0.1.62 solves the problem.