network-audio-controller icon indicating copy to clipboard operation
network-audio-controller copied to clipboard

fix: StopIteration error when channel number is not cast to an int

Open dakriy opened this issue 7 months ago • 1 comments

Since channel number was not cast to an int, the channel was never matched and never found resulting in the following error even when using correct channel numbers for subscription add and remove commands.

  RuntimeError

  coroutine raised StopIteration

  at /usr/lib/python3.12/asyncio/base_events.py:687 in run_until_complete
       683│             future.remove_done_callback(_run_until_complete_cb)
       684│         if not future.done():
       685│             raise RuntimeError('Event loop stopped before Future completed.')
       686│ 
    →  687│         return future.result()
       688│ 
       689│     def stop(self):
       690│         
       691│ 

Fixes #10

dakriy avatar Jun 01 '25 17:06 dakriy

Great PR, this needs to be added, while you're at it, the IP address also has a similar issue and should be assigned like this (changing tx/rx as needed):

lambda d: d[1].ipv4 == ipaddress.ip_address(self.option("rx-device-host"))

Edit: opened a PR myself - #38

normen avatar Jul 21 '25 14:07 normen