Core: Snapcast component broken

Created on 11 Apr 2017  路  4Comments  路  Source: home-assistant/core

Thank you for creating this awesome project.

Snapcast was working pre version 11.

Home Assistant release (hass --version): 0.42.3

Python release (python3 --version): 3.4.2

Component/platform: Snapcast

Description of problem: Wont start/gives error

Expected: Working

Problem-relevant configuration.yaml entries and steps to reproduce:

media_player:
  - platform: snapcast
    host: 192.168.1.128

  - platform: mpd
    host: 192.168.1.128

Traceback (if applicable):

7-04-11 18:18:37 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.mpd
17-04-11 18:18:37 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up platform snapcast
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py", line 153, in _async_setup_platform
    entity_platform.schedule_add_entities, discovery_info
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/media_player/snapcast.py", line 43, in setup_platform
    server = snapcast.control.Snapserver(host, port)
  File "/var/opt/homeassistant/deps/snapcast/control.py", line 164, in __init__
    self.synchronize()
  File "/var/opt/homeassistant/deps/snapcast/control.py", line 239, in synchronize
    for client in status.get('clients'):
TypeError: 'NoneType' object is not iterable

Additional info: The developer of Snapcast changed the communication protocol

problem in dependency

Most helpful comment

Support for 0.11.1 is in the works. Likely in HA 0.43.

All 4 comments

Support for 0.11.1 is in the works. Likely in HA 0.43.

I can reproduce this error.

(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $ hass --version
0.45.1
May 29 21:15:57 raspberrypi hass[26532]: ERROR:homeassistant.components.media_player:Error while setting up platform snapcast
May 29 21:15:57 raspberrypi hass[26532]: Traceback (most recent call last):
May 29 21:15:57 raspberrypi hass[26532]: File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py"
, line 155, in _async_setup_platform
May 29 21:15:57 raspberrypi hass[26532]: entity_platform.schedule_add_entities, discovery_info
May 29 21:15:57 raspberrypi hass[26532]: File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__                            
May 29 21:15:57 raspberrypi hass[26532]: yield self  # This tells Task to wait for completion.                                          
May 29 21:15:57 raspberrypi hass[26532]: File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
May 29 21:15:57 raspberrypi hass[26532]: value = future.result()
May 29 21:15:57 raspberrypi hass[26532]: File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result                              
May 29 21:15:57 raspberrypi hass[26532]: raise self._exception
May 29 21:15:57 raspberrypi hass[26532]: File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
May 29 21:15:57 raspberrypi hass[26532]: result = self.fn(*self.args, **self.kwargs)
May 29 21:15:57 raspberrypi hass[26532]: File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/media_player/snap
cast.py", line 43, in setup_platform
May 29 21:15:57 raspberrypi hass[26532]: server = snapcast.control.Snapserver(host, port)
May 29 21:15:57 raspberrypi hass[26532]: File "/home/homeassistant/.homeassistant/deps/snapcast/control.py", line 164, in __init__
May 29 21:15:57 raspberrypi hass[26532]: self.synchronize()
May 29 21:15:57 raspberrypi hass[26532]: File "/home/homeassistant/.homeassistant/deps/snapcast/control.py", line 239, in synchronize
May 29 21:15:57 raspberrypi hass[26532]: for client in status.get('clients'):                                                           
May 29 21:15:57 raspberrypi hass[26532]: TypeError: 'NoneType' object is not iterable

Yes. It will be broken until https://github.com/home-assistant/home-assistant/pull/7079 is merged.

Fixed in #7079

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sogeniusio picture sogeniusio  路  3Comments

YellowMonster76 picture YellowMonster76  路  3Comments

arangates picture arangates  路  3Comments

MartinHjelmare picture MartinHjelmare  路  3Comments

coolriku picture coolriku  路  3Comments