streamlit-application-deployment-on-aws icon indicating copy to clipboard operation
streamlit-application-deployment-on-aws copied to clipboard

yahoo_idx.py raises exception in standup.sh

Open schnabel opened this issue 2 years ago • 1 comments

Hi, when running the standup.sh script I get:

Pulling data from: 2006-05-16 to 2007-01-01
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.9/threading.py", line 910, in run
    self._target(*self._args, **self._kwargs)
  File "/home/dirk/git/schnabel/streamlit-application-deployment-on-aws/venv/lib/python3.9/site-packages/multitasking/__init__.py", line 102, in _run_via_pool
    return callee(*args, **kwargs)
  File "/home/dirk/git/schnabel/streamlit-application-deployment-on-aws/venv/lib/python3.9/site-packages/yfinance/multi.py", line 167, in _download_one_threaded
    data = _download_one(ticker, start, end, auto_adjust, back_adjust,
  File "/home/dirk/git/schnabel/streamlit-application-deployment-on-aws/venv/lib/python3.9/site-packages/yfinance/multi.py", line 179, in _download_one
    return Ticker(ticker).history(period=period, interval=interval,
  File "/home/dirk/git/schnabel/streamlit-application-deployment-on-aws/venv/lib/python3.9/site-packages/yfinance/base.py", line 157, in history
    data = data.json()
  File "/home/dirk/git/schnabel/streamlit-application-deployment-on-aws/venv/lib/python3.9/site-packages/requests/models.py", line 900, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/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)

updating yfinance to version 0.1.70 resolved the issue.

schnabel avatar Feb 07 '22 10:02 schnabel

updating the requirements.txt with following resolved the issue requests==2.26 yfinance==0.1.70

gkranasinghe avatar Apr 25 '22 05:04 gkranasinghe

fixed in #9

sunbc0120 avatar Nov 02 '22 02:11 sunbc0120