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' #58

Closed ml88nl closed 1 year ago

ml88nl 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 :)

Originally posted by @wvds in https://github.com/dylandoamaral/trakt-integration/issues/56#issuecomment-1356744375

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'

I am not one to reopen a closed issue, but I am experiencing the same issue. I had an "old API APP" which I used again. So i figured lets create a new API APP. But that didn't resolve the issue.

I noticed that Trakt stated on twitter that they where back online. Anyone else experiencing this same issue?

Version of Home Assistant: Docker Container, running homeassistant/home-assistant:2022.12 Integration version 0.7.1

GenericRyan commented 1 year ago

I also ran into this error following the API being turned back on. Deleting the integration and re-adding, then restarting resolved it for me.

HA OS 2022.12.7.

ml88nl commented 1 year ago

I also ran into this error following the API being turned back on. Deleting the integration and re-adding, then restarting resolved it for me.

HA OS 2022.12.7.

Thank you GenericRyan, i did all those steps previously but without actually removing the package from HACS and then reinstalling it. Now it is working.