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

Error while setting up - HA 2021.8.1 #20

Closed LEJOUI closed 2 years ago

LEJOUI commented 2 years ago

Version of the custom_component

0.3.5

Configuration


- platform: emby_upcoming_media
  api_key: ***
  user_id: ***
  host: 192.168.***.***
  port: 8096
  ssl: false
  max: 5
  use_backdrop: true

Describe the bug

A clear and concise description of what the bug is.

I’ve noticed that the sensor doesn’t setup in the latest beta versions of HA 2021.8. Edit: Issue persists in the stable 2021.8

Debug log


Logger: homeassistant.components.sensor
Source: custom_components/emby_upcoming_media/sensor.py:94 
Integration: Sensor (documentation, issues) 
First occurred: 8:49:37 (1 occurrences) 
Last logged: 8:49:37

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 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/emby_upcoming_media/sensor.py", line 94, in setup_platform
    categories = filter(lambda el: 'CollectionType' in el.keys() and el["CollectionType"] in DICT_LIBRARY_TYPES.keys(), categories) #just include supported library types (movie/tv)
TypeError: 'NoneType' object is not iterable
LEJOUI commented 2 years ago

My stupid mistake 🤦. Forget that my backup didn’t recover Emby. Closing.