Skip to content

yahoo_idx.py raises exception in standup.sh #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
schnabel opened this issue Feb 7, 2022 · 2 comments
Closed

yahoo_idx.py raises exception in standup.sh #8

schnabel opened this issue Feb 7, 2022 · 2 comments

Comments

@schnabel
Copy link

schnabel commented Feb 7, 2022

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.

@gkranasinghe
Copy link
Contributor

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

@sunbc0120
Copy link
Contributor

fixed in #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants