cannot unpack non-iterable NoneType object
pedro2d10 opened this issue · 2 comments
Hello,
I tried this component and I can't make it to work. In the log i have:
Error while setting up platform plex_recently_added Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 149, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for return fut.result() File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/plex_recently_added/sensor.py", line 53, in setup_platform add_devices([PlexRecentlyAddedSensor(hass, config, name)], True) File "/config/custom_components/plex_recently_added/sensor.py", line 76, in __init__ self.server_name, self.token) TypeError: cannot unpack non-iterable NoneType object
And here my config file:
- platform: plex_recently_added token: !secret plex_token host: 192.168.1.111 port: 32400 ssl: false ssl_cert: false download_images: false max: 5 section_types: - Films
I successfully add the Radarr component and the address http(s)://[IP]:[port]/library/recentlyAdded?X-Plex-Token=[token]
work well , it return a big xml in my browser.
Is anybopdy having the same issue?
For information i'm in Hassio 97.2
Seems to be trying to use server_name, though your example doesn't show one. Try a minimal setup and only add config that you need, don't copy from the example in readme:
sensor:
- platform: plex_recently_added
token: !secret plex_token
host: 192.168.1.111
port: 32400
Also check that the default HA plex component works for you.
Yes!!, it work with the minimal configuration. Thank you very much.