I'm receiving the following error randomly when making a GET request.
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I am not receiving a rate limit error from the API, so I'm not sure why this error occurs. I assume is because the JSON object is empty.
import requests
try:
r = requests.get(url=url)
except requests.exceptions.RequestException as e:
logging.error(e)
else:
if r.status_code == 200:
data = r.json()
The response is usually like this
[['string', 1.2, 20.4, 8.6, 9.3, 5.6, 6.5, 8.6, 7.8, 8.8, 8.3]]
') in them.