dylandoamaral / trakt-integration

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

Unexpected error fetching trakt data: 'HassClientResponse' object has no attribute 'status_code' #56

Closed Robbot closed 1 year ago

Robbot commented 1 year ago

I think this was present in the last week too, but since the trakt database was down I ignored it. The database is back online now but the problem with integration persists.

This error originated from a custom integration.

Logger: custom_components.trakt_tv Source: custom_components/trakt_tv/apis/trakt.py:68 Integration: Trakt (documentation, issues) First occurred: 17 December 2022 at 15:03:27 (768 occurrences) Last logged: 07:58:30

Unexpected error fetching trakt data: 'HassClientResponse' object has no attribute 'status_code' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 225, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 181, in _async_update_data return await self.update_method() File "/config/custom_components/trakt_tv/apis/trakt.py", line 289, in retrieve_data data = await gather( File "/config/custom_components/trakt_tv/apis/trakt.py", line 263, in fetch_recommendations data = await gather( File "/config/custom_components/trakt_tv/apis/trakt.py", line 256, in fetch_recommendation return await self.request( File "/config/custom_components/trakt_tv/apis/trakt.py", line 68, in request elif response.status_code == 429: AttributeError: 'HassClientResponse' object has no attribute 'status_code'

wvds commented 1 year ago

@Robbot I think it's because the Trakt API is still offline because of the database crash. As their Trakt Twitter account confirms: https://twitter.com/trakt/status/1604114567579111425

So I guess we just have to wait until next week, when the API is back up :)

Robbot commented 1 year ago

Good point...Thanks for your update. Let's wait and I hope the issue will be fixed itself.