gcorgnet / sensor.emby_upcoming_media

Home Assistant component to feed Upcoming Media Card with the latest releases on an Emby instance.
MIT License
20 stars 17 forks source link

Addon does not work on latest Home assistant 2024-02. The new python version? #32

Closed joggs closed 5 months ago

joggs commented 5 months ago

Version of the custom_component

Configuration


      api_key: f4089898efd84940bd54f94xxxx
      user_id: 1fb915256d544c589ac75xxx
      host: 192.168.0.40
      port: 8096
      ssl: false
      max: 20
      use_backdrop: true
      group_libraries: false

Add your logs here.

2024-02-07 12:21:54.773 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up emby_upcoming_media platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/emby_upcoming_media/sensor.py", line 92, in setup_platform
categories = client.get_view_categories()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/emby_upcoming_media/client.py", line 42, in get_view_categories
return self.data["ViewCategories"]
~~~~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'ViewCategories'

## Describe the bug
The addon gets the above error at startup.
No changes in the setup arguments.
KeyError: 'ViewCategories'  ?

## Debug log

<!-- To enable debug logs check this https://www.home-assistant.io/components/logger/ -->

```2024-02-07 12:21:54.773 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up emby_upcoming_media platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/emby_upcoming_media/sensor.py", line 92, in setup_platform
categories = client.get_view_categories()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/emby_upcoming_media/client.py", line 42, in get_view_categories
return self.data["ViewCategories"]
~~~~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'ViewCategories'

Add your logs here.

```2024-02-07 12:21:54.773 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up emby_upcoming_media platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/emby_upcoming_media/sensor.py", line 92, in setup_platform
categories = client.get_view_categories()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/emby_upcoming_media/client.py", line 42, in get_view_categories
return self.data["ViewCategories"]
~~~~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'ViewCategories'
xlyralycanx commented 5 months ago

Version of the custom_component

Hi, This version is not maintained. Please download "Emby Latest Media (2024)" from the HACS store instead, or go here.

gcorgnet commented 5 months ago

Updated this thanks to xlyralycanx's PR. Thank you both!