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

股票 1102 抓取1年內的資料遇到問題 #104

Open
Kimbo-Chang opened this issue May 16, 2022 · 0 comments
Open

股票 1102 抓取1年內的資料遇到問題 #104

Kimbo-Chang opened this issue May 16, 2022 · 0 comments

Comments

@Kimbo-Chang
Copy link

Traceback (most recent call last):
File "C:\Users\User\anaconda3\envs\stock\lib\site-packages\requests\models.py", line 910, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Users\User\anaconda3\envs\stock\lib\site-packages\simplejson_init_.py", line 525, in loads
return _default_decoder.decode(s)
File "C:\Users\User\anaconda3\envs\stock\lib\site-packages\simplejson\decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "C:\Users\User\anaconda3\envs\stock\lib\site-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)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "股市.py", line 61, in
stock_1Y = stock.fetch_from(int(Y) - 1, int(M)) #近1年內的資訊
File "C:\Users\User\anaconda3\envs\stock\lib\site-packages\twstock\stock.py", line 175, in fetch_from
self.raw_data.append(self.fetcher.fetch(year, month, self.sid))
File "C:\Users\User\anaconda3\envs\stock\lib\site-packages\twstock\stock.py", line 61, in fetch
data = r.json()
File "C:\Users\User\anaconda3\envs\stock\lib\site-packages\requests\models.py", line 917, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: [Errno Expecting value]

您好:

本公司全球資訊網已於106年5月23日改版,您目前瀏覽使用的網址並不正確,建議您自首頁(http://www.twse.com.tw/)重新瀏覽,並更新瀏覽器「我的最愛」或「書籤」設定。

如須進一步協助請參閱本公司官網改版問答集(http://www.twse.com.tw/downloads/zh/home/TWSE_QA.pdf),或洽投資人服務中心專線:(02)2792-8188
錯誤代碼為:N/A
事件代碼為:6906427980889581588

TWSE revised the official website on 23rd May, 2017. The URL address you were trying to reach seem to be incorrect or outdated. Please update your browser bookmark(s), thank you.



TWSE official website: http://www.twse.com.tw/

Page Error Code:N/A

Event ID:6906427980889581588

: 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