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

simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0) #1

Open
terrykyo opened this issue Oct 27, 2021 · 0 comments

Comments

@terrykyo
Copy link

simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

$ python3 parse_stock.py -tw
agastock[2021-10-27 09:57:27][INFO ] -----------------------------------------------------------
agastock[2021-10-27 09:57:27][INFO ] [TW STOCK PARSER]
agastock[2021-10-27 09:57:27][INFO ] DIR_BASE: /home/terry/agastock/agastock
agastock[2021-10-27 09:57:27][INFO ] PATH_STOCK_CSV: /home/terry/agastock/agastock/out/stock_summary_tw.csv
agastock[2021-10-27 09:57:27][INFO ] PATHNOTIFY_CSV: /home/terry/agastock/agastock/out/line_notify_tw.csv
agastock[2021-10-27 09:57:27][INFO ] stock csv 讀取失敗
agastock[2021-10-27 09:57:27][INFO ] _query_punish_stock (@QueryHandler_NoLoop)
agastock[2021-10-27 09:57:28][INFO ] query_info (@QueryHandler_ForLoop)
agastock[2021-10-27 09:57:28][INFO ] _query_price_yfinance (@QueryHandler_NoLoop)
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/terry/.local/lib/python3.7/site-packages/multitasking/init.py", line 102, in _run_via_pool
return callee(*args, **kwargs)
File "/home/terry/.local/lib/python3.7/site-packages/yfinance/multi.py", line 168, in _download_one_threaded
actions, period, interval, prepost, proxy, rounding)
File "/home/terry/.local/lib/python3.7/site-packages/yfinance/multi.py", line 183, in _download_one
rounding=rounding, many=True)
File "/home/terry/.local/lib/python3.7/site-packages/yfinance/base.py", line 157, in history
data = data.json()
File "/home/terry/.local/lib/python3.7/site-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)

Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/terry/.local/lib/python3.7/site-packages/multitasking/init.py", line 102, in _run_via_pool
return callee(*args, **kwargs)
File "/home/terry/.local/lib/python3.7/site-packages/yfinance/multi.py", line 168, in _download_one_threaded
actions, period, interval, prepost, proxy, rounding)
File "/home/terry/.local/lib/python3.7/site-packages/yfinance/multi.py", line 183, in _download_one
rounding=rounding, many=True)
File "/home/terry/.local/lib/python3.7/site-packages/yfinance/base.py", line 157, in history
data = data.json()
File "/home/terry/.local/lib/python3.7/site-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)

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

1 participant