Had same issue with Not Authorized before. After 0.33.2, that error is gone, but got the following:
Traceback (most recent call last):
File "/chronos/scripts/ws-sync/.venv/lib/python3.10/site-packages/requests/models.py", line 1116, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.10/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.10/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)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/chronos/scripts/ws-sync/.venv/lib/python3.10/site-packages/ws_api/wealthsimple_api.py", line 83, in send_http_request
return response.json()
File "/chronos/scripts/ws-sync/.venv/lib/python3.10/site-packages/requests/models.py", line 1120, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/chronos/scripts/ws-sync/ws-sync.py", line 506, in <module>
WSApiTest().main()
File "/chronos/scripts/ws-sync/ws-sync.py", line 128, in main
ws = WealthsimpleAPI.from_token(session, persist_session_fct, username)
File "/chronos/scripts/ws-sync/.venv/lib/python3.10/site-packages/ws_api/wealthsimple_api.py", line 399, in from_token
ws.check_oauth_token(persist_session_fct, username)
File "/chronos/scripts/ws-sync/.venv/lib/python3.10/site-packages/ws_api/wealthsimple_api.py", line 177, in check_oauth_token
self.search_security("XEQT")
File "/chronos/scripts/ws-sync/.venv/lib/python3.10/site-packages/ws_api/wealthsimple_api.py", line 165, in search_security
return self.do_graphql_query(
File "/chronos/scripts/ws-sync/.venv/lib/python3.10/site-packages/ws_api/wealthsimple_api.py", line 294, in do_graphql_query
response_data = self.send_post(
File "/chronos/scripts/ws-sync/.venv/lib/python3.10/site-packages/ws_api/wealthsimple_api.py", line 101, in send_post
return self.send_http_request(
File "/chronos/scripts/ws-sync/.venv/lib/python3.10/site-packages/ws_api/wealthsimple_api.py", line 85, in send_http_request
raise CurlException(f"HTTP request failed: {e}")
ws_api.exceptions.CurlException: HTTP request failed: Expecting value: line 1 column 1 (char 0)
Had same issue with Not Authorized before. After 0.33.2, that error is gone, but got the following:
Thank you!!