Pandas-datareader: ERROR - JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Created on 10 Jul 2021  路  7Comments  路  Source: pydata/pandas-datareader

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!!

Most helpful comment

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.

All 7 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhongdai picture zhongdai  路  5Comments

Chandrak1907 picture Chandrak1907  路  4Comments

wavesailor picture wavesailor  路  5Comments

tr4cefl0w picture tr4cefl0w  路  3Comments

PLAYER69 picture PLAYER69  路  7Comments