Skip to content
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

How do I fix my JSON error when it doesn't show loading data for all stocks? #24

Closed
MasterHiddenTank opened this issue Aug 2, 2021 · 3 comments

Comments

@MasterHiddenTank
Copy link

MasterHiddenTank commented Aug 2, 2021

Hey everyone,

I've been using surpriver for a little while and this was the first time that this has happened. Thanks!

Surpriver has been initialized...
Data engine has been initialized...
Loading all stocks from file...
Total number of stocks: 5693
Technical Indicator Engine has been initialized
Loading data for all stocks...
  0%|                                                  | 0/5693 [00:00<?, ?it/s]Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.8/dist-packages/multitasking/__init__.py", line 102, in _run_via_pool
    return callee(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/yfinance/multi.py", line 166, in _download_one_threaded
    data = _download_one(ticker, start, end, auto_adjust, back_adjust,
  File "/usr/local/lib/python3.8/dist-packages/yfinance/multi.py", line 178, in _download_one
    return Ticker(ticker).history(period=period, interval=interval,
  File "/usr/local/lib/python3.8/dist-packages/yfinance/base.py", line 155, in history
    data = data.json()
  File "/usr/local/lib/python3.8/dist-packages/requests/models.py", line 898, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 518, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@MasterHiddenTank MasterHiddenTank changed the title JSON Error How do I fix my JSON error when it doesn't show loading data for all stocks? Aug 2, 2021
@Stas1407
Copy link

Stas1407 commented Aug 4, 2021

I've faced the same issue and updating yfinance to 0.1.63 worked for me.

@MasterHiddenTank
Copy link
Author

I've faced the same issue and updating yfinance to 0.1.63 worked for me.

Cool! I'll try it later!

@MasterHiddenTank
Copy link
Author

I've faced the same issue and updating yfinance to 0.1.63 worked for me.

Works thanks!

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

2 participants