dylandoamaral / trakt-integration

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

"Next to watch" still broken #79

Closed K-RAD closed 1 year ago

K-RAD commented 1 year ago

If I enable the next to watch, the integration will not initialize. This was raised before, but still not fixed. Other sensors work

` Logger: custom_components.trakt_tv Source: custom_components/trakt_tv/apis/trakt.py:112 Integration: Trakt (documentation, issues) First occurred: 9:20:02 AM (1 occurrences) Last logged: 9:20:02 AM

Unexpected error fetching trakt data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 217, in _async_update_data return await self.update_method() File "/config/custom_components/trakt_tv/apis/trakt.py", line 304, in retrieve_data data = await gather( File "/config/custom_components/trakt_tv/apis/trakt.py", line 251, in fetch_next_to_watch data = await gather( File "/config/custom_components/trakt_tv/apis/trakt.py", line 206, in fetch_upcoming raw_medias = await self.fetch_watched(excluded_shows) File "/config/custom_components/trakt_tv/apis/trakt.py", line 112, in fetch_watched for hidden_item in hidden_items: TypeError: 'NoneType' object is not iterable `

Anrolosia commented 1 year ago

Hey @K-RAD , I'm not sure you're on the latest version, because the line in error is not line 112 (https://github.com/dylandoamaral/trakt-integration/blob/main/custom_components/trakt_tv/apis/trakt.py#L135-L136), what do you think @dylandoamaral ?

dylandoamaral commented 1 year ago

I think you are right, please update to the latest before writing an issue. Reopen this issue if we made a mistake of if the issue still exists.