You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.
Occasionally the server would return invalid JSON data. In which case a JSONDecodeError is raised:
File "/home/travis/build/jyu00/qiskit-ibmq-provider/qiskit/providers/ibmq/api/clients/account.py", line 90, in backend_status
return self.client_api.backend(backend_name).status()
File "/home/travis/build/jyu00/qiskit-ibmq-provider/qiskit/providers/ibmq/api/rest/backend.py", line 82, in status
response = self.session.get(url).json()
File "/home/travis/virtualenv/python3.8.0/lib/python3.8/site-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/opt/python/3.8.0/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/opt/python/3.8.0/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/opt/python/3.8.0/lib/python3.8/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)
This can be confusing to the user, who might just be doing a normal job.cancel() or backend.status(). We should wrap this with something like RequestsApiError and a message saying invalid data received from the server. Or just retry the request as that usually works.
The text was updated successfully, but these errors were encountered:
What is the expected behavior?
Occasionally the server would return invalid JSON data. In which case a
JSONDecodeError
is raised:This can be confusing to the user, who might just be doing a normal
job.cancel()
orbackend.status()
. We should wrap this with something likeRequestsApiError
and a message saying invalid data received from the server. Or just retry the request as that usually works.The text was updated successfully, but these errors were encountered: