yfinance: json.decoder.JSONDecodeError

July 9, 2021

If you’re getting an json.decoder.JSONDecodeError related error, please upgrade to yfinance 0.1.62.

Upgrade using:

$ pip install yfinance --upgrade --no-cache-dir

Best, - Ran Aroussi

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 48
  • Comments: 30 (2 by maintainers)

Most upvoted comments

Still observe the issue in 0.1.62

    import yfinance as yf
    handle = yf.Ticker("AOS")
    data = handle.history()
    print(data)

File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 348, in loads return _default_decoder.decode(s) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I had the same error with @kevinvud’s above. I think it has something to do with the server. Also the newest version of yfinance I could access was 0.1.61 ERROR: No matching distribution found for yfinance==0.1.62

Same error with python 3.8 and 0.1.63 … 😦 simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)