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
Recurrent error, mostly something with the python version (3.8) or the API format to electricitymaps.com. Pasting the error message here.
File "/home/image/miniconda3/lib/python3.8/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "/home/image/miniconda3/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/home/image/miniconda3/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/home/image/miniconda3/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)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/image/miniconda3/lib/python3.8/site-packages/carbontracker/emissions/intensity/intensity.py", line 105, in carbon_intensity
carbon_intensity = fetcher.carbon_intensity(g_location, time_dur)
File "/home/image/miniconda3/lib/python3.8/site-packages/carbontracker/emissions/intensity/fetchers/energidataservice.py", line 21, in carbon_intensity
ci = self._emission_prognosis(time_dur=time_dur)
File "/home/image/miniconda3/lib/python3.8/site-packages/carbontracker/emissions/intensity/fetchers/energidataservice.py", line 48, in _emission_prognosis
raise exceptions.CarbonIntensityFetcherError(response.json())
File "/home/image/miniconda3/lib/python3.8/site-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0) ```
The text was updated successfully, but these errors were encountered:
I don't know if this is a python version mismatch or due to an update in electricitymaps API. But these two changes now fixes it:
Change time string formatting here to: date_format = "%Y-%m-%dT%H:%M"
And the parsing of url here should not have any curly brackets.
Recurrent error, mostly something with the python version (3.8) or the API format to electricitymaps.com. Pasting the error message here.
The text was updated successfully, but these errors were encountered: