dylandoamaral / trakt-integration

A Trakt integration for Home Assistant compatible with upcoming media card
MIT License
32 stars 13 forks source link

Integration error while getting data #44

Closed Jhonattan-Souza closed 1 year ago

Jhonattan-Souza commented 2 years ago
2022-09-20 01:59:31.248 ERROR (MainThread) [custom_components.trakt_tv] Unexpected error fetching trakt data: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 164, in _async_update_data
return await self.update_method()
File "/config/custom_components/trakt_tv/apis/trakt.py", line 150, in retrieve_data
data = await gather(
File "/config/custom_components/trakt_tv/apis/trakt.py", line 141, in fetch_recommendations
raw_medias = json.loads(payload)
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)

Any tips to solve this problem ?

dylandoamaral commented 2 years ago

No, apparently, the trakt integration didn't receive a correct Json. I will create new version of trakt that will give more information.

This is due to recommendations, for the moment you can remove these sensors.

dylandoamaral commented 2 years ago

The release 0.4.2 will give more insight, tell me what is the new error after the update.

dylandoamaral commented 1 year ago

Feel free to reopen if the issue persist