-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
Attempting to add a subscription by channel number does not work (results in RuntimeError: coroutine raised StopIteration).
I think this is because it's attempting to match channel.number (which is an int) against self.option('rx-channel-number') (which is a str). I added a line of debugging to commands/subscription/_add.py as follows:
# ...
elif self.option("rx-channel-number"):
for ch in rx_device.rx_channels.values():
print('Considering', ch.number, type(ch.number), type(self.option('rx-channel-number')), ch.number == self.option('rx-channel-number'))
# ...resulting in:
$ netaudio subscription add --tx-device-name StreamPC --tx-channel-name Right --rx-device-name VisualsPC --rx-channel-number 1
Considering 1 <class 'int'> <class 'str'> False
Considering 2 <class 'int'> <class 'str'> False
Considering 3 <class 'int'> <class 'str'> False
Considering 4 <class 'int'> <class 'str'> False
Considering 5 <class 'int'> <class 'str'> False
Considering 6 <class 'int'> <class 'str'> False
Considering 7 <class 'int'> <class 'str'> False
Considering 8 <class 'int'> <class 'str'> False
Considering 9 <class 'int'> <class 'str'> False
Considering 10 <class 'int'> <class 'str'> False
Considering 11 <class 'int'> <class 'str'> False
Considering 12 <class 'int'> <class 'str'> False
Considering 13 <class 'int'> <class 'str'> False
Considering 14 <class 'int'> <class 'str'> False
Considering 15 <class 'int'> <class 'str'> False
Considering 16 <class 'int'> <class 'str'> False
In case it makes a difference, this is on both Python 3.8 and 3.9, using v0.0.10 of netaudio.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels