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

[BUG]:json.decoder.JSONDecodeError when the url is wrong #7

Open
Bidaya0 opened this issue Jan 25, 2022 · 0 comments
Open

[BUG]:json.decoder.JSONDecodeError when the url is wrong #7

Bidaya0 opened this issue Jan 25, 2022 · 0 comments

Comments

@Bidaya0
Copy link

Bidaya0 commented Jan 25, 2022

File "", line 1, in
File "/home/bidaya0/.local/lib/python3.9/site-packages/dongtai_sdk/DongTai.py", line 23, in GetProjectList
repData = self.dongTaiApi.GetProjectList(page,pageSize,name)
File "/home/bidaya0/.local/lib/python3.9/site-packages/dongtai_sdk/DongTaiApi.py", line 65, in GetProjectList
return self.GetResponse("/projects","GET",data)
File "/home/bidaya0/.local/lib/python3.9/site-packages/dongtai_sdk/DongTaiApi.py", line 27, in GetResponse
return json.loads(rep.text)
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)

Should some fault tolerance logic and hints be added?

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