You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my Snapcast setup I have multiple input-only streams that get grouped within a meta stream. This meta stream also get grouped into another meta stream.
Some of the input-only streams have a control script to provide stream properties & metadata. When a properties update is received a KeyError is thrown from _on_stream_properties.
Here's a simplified setup
# Input only streams
source = pipe:///streams/gmrender-resurrect-all-rooms?name=upnp-all-rooms&codec=null&controlscript=/usr/local/bin/snapcast-upnp
source = airplay:////usr/local/bin/shairport-sync?name=airplay-all-rooms&devicename=Snapcast - All Rooms&port=5000&codec=null
source = librespot:///bin/librespot?name=spotify-all-rooms&devicename=Snapcast - All Rooms&codec=null
# Input only meta source for all rooms
source = meta:///upnp-all-rooms/airplay-all-rooms/spotify-all-rooms?name=all-rooms&codec=null
# Meta sources for individual rooms
source = meta:///upnp-bedroom/airplay-bedroom/spotify-bedroom/all-rooms?name=Bedroom
source = meta:///upnp-living-room/airplay-living-room/spotify-living-room/all-rooms?name=Living Room
Pretty much it's Input-only stream w/ script -> Input-only meta stream -> Meta stream
And here's the error
ERROR: Fatal error: protocol.data_received() call failed.
protocol: <snapcast.control.protocol.SnapcastProtocol object at 0x7f57e6fa0e50>
transport: <_SelectorSocketTransport fd=6 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/usr/lib/python3.11/asyncio/selector_events.py", line 1009, in _read_ready__data_received
self._protocol.data_received(data)
File "/home/wyse/.local/lib/python3.11/site-packages/snapcast/control/protocol.py", line 54, in data_received
self.handle_data(item)
File "/home/wyse/.local/lib/python3.11/site-packages/snapcast/control/protocol.py", line 61, in handle_data
self.handle_notification(data)
File "/home/wyse/.local/lib/python3.11/site-packages/snapcast/control/protocol.py", line 73, in handle_notification
self._callbacks.get(data.get('method'))(data.get('params'))
File "/home/wyse/.local/lib/python3.11/site-packages/snapcast/control/server.py", line 420, in _on_stream_properties
stream = self._streams[data.get('id')]
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'all-rooms'
I dumped the contents of self._streams and the incoming data. It appears Snapcast is generating a properties update for the 2nd meta stream which the library is not tracking.
In my Snapcast setup I have multiple input-only streams that get grouped within a meta stream. This meta stream also get grouped into another meta stream.
Some of the input-only streams have a control script to provide stream properties & metadata. When a properties update is received a KeyError is thrown from
_on_stream_properties
.Here's a simplified setup
Pretty much it's
Input-only stream w/ script -> Input-only meta stream -> Meta stream
And here's the error
I dumped the contents of
self._streams
and the incomingdata
. It appears Snapcast is generating a properties update for the 2nd meta stream which the library is not tracking.Contents of
self._streams
Incoming
data
I don't know if Snapcast shouldn't be generating the update for this meta stream, but at least this library can add a check for the ID.
The text was updated successfully, but these errors were encountered: