dylandoamaral / trakt-integration

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

Will not initialize #65

Closed K-RAD closed 1 year ago

K-RAD commented 1 year ago

Just installed it, and it keeps going between Initializing and Retrying setup - Check the logs. The logs don't say nothing really

Logger: homeassistant.bootstrap
Source: bootstrap.py:485
First occurred: January 28, 2023 at 11:48:44 PM (1 occurrences)
Last logged: January 28, 2023 at 11:48:44 PM

Waiting on integrations to complete setup: trakt_tv

and

023-01-28 23:47:32.832 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration trakt_tv which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2023-01-28 23:48:44.243 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: trakt_tv 2023-01-28 23:48:46.883 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Trakt' for trakt_tv integration not ready yet; Retrying in background

K-RAD commented 1 year ago

Now I get

Logger: custom_components.trakt_tv
Source: custom_components/trakt_tv/apis/trakt.py:75
Integration: Trakt ([documentation](https://github.com/dylandoamaral/trakt-integration), [issues](https://github.com/dylandoamaral/trakt-integration/issues))
First occurred: 8:00:19 AM (2 occurrences)
Last logged: 9:21:43 AM

Unexpected error fetching trakt data: Can't request shows/1393/progress/watched with get because it returns a 502 status code with reason Bad Gateway. If you find this error, please raise an issue at https://github.com/dylandoamaral/trakt-integration/issues.
Unexpected error fetching trakt data: Can't request shows/146535/progress/watched with get because it returns a 502 status code with reason Bad Gateway. If you find this error, please raise an issue at https://github.com/dylandoamaral/trakt-integration/issues.
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 236, in fetch_next_to_watch
    data = await gather(
  File "/config/custom_components/trakt_tv/apis/trakt.py", line 191, in fetch_upcoming
    raw_medias = await self.fetch_watched(excluded_shows)
  File "/config/custom_components/trakt_tv/apis/trakt.py", line 123, in fetch_watched
    raw_episode = await self.fetch_show_progress(ids["trakt"])
  File "/config/custom_components/trakt_tv/apis/trakt.py", line 141, in fetch_show_progress
    return await self.request("get", f"shows/{id}/progress/watched")
  File "/config/custom_components/trakt_tv/apis/trakt.py", line 75, in request
    raise TraktException(f"{error}\n{guidance}")
custom_components.trakt_tv.exception.TraktException: Can't request shows/1393/progress/watched with get because it returns a 502 status code with reason Bad Gateway.
If you find this error, please raise an issue at https://github.com/dylandoamaral/trakt-integration/issues.

But the authorization was successful with the workaround

image

image

hindsight2021 commented 1 year ago

I have this same issue since the last hotfix...

Logger: custom_components.trakt_tv Source: custom_components/trakt_tv/apis/trakt.py:75 Integration: Trakt (documentation, issues) First occurred: 3:00:19 AM (1 occurrences) Last logged: 3:00:19 AM Unexpected error fetching trakt data: Can't request shows/188608/progress/watched with get because it returns a 502 status code with reason Bad Gateway. If you find this error, please raise an issue at https://github.com/dylandoamaral/trakt-integration/issues.

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 236, in fetch_next_to_watch data = await gather( File "/config/custom_components/trakt_tv/apis/trakt.py", line 191, in fetch_upcoming raw_medias = await self.fetch_watched(excluded_shows) File "/config/custom_components/trakt_tv/apis/trakt.py", line 123, in fetch_watched raw_episode = await self.fetch_show_progress(ids["trakt"]) File "/config/custom_components/trakt_tv/apis/trakt.py", line 141, in fetch_show_progress return await self.request("get", f"shows/{id}/progress/watched") File "/config/custom_components/trakt_tv/apis/trakt.py", line 75, in request raise TraktException(f"{error}\n{guidance}") custom_components.trakt_tv.exception.TraktException: Can't request shows/188608/progress/watched with get because it returns a 502 status code with reason Bad Gateway. If you find this error, please raise an issue at https://github.com/dylandoamaral/trakt-integration/issues.

dylandoamaral commented 1 year ago

Same as #64