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
Helo I am using python3, and a scarlet 18i20. I got an error in extract_controls().
I have add to print to check the problem
def _extract_controls():
dump = subprocess.check_output(
["amixer", "-cUSB", "controls"])
#print(dump)
for line in dump.splitlines():
print("line : ",line)
num_id, _, name = line.split(b",")
_, num_id = num_id.split(b"=")
num_id = int(num_id.decode('ascii'))
_, name = name.split(b"=")
name = name.decode('ascii').strip("'")
print("name = ",name,"num_id =", num_id)
yield name, num_id
it ends with :
line : b"numid=9,iface=MIXER,name='Master Playback Volume'"
name = Master Playback Volume num_id = 9
line : b"numid=1,iface=MIXER,name='Extension Unit Switch'"
name = Extension Unit Switch num_id = 1
line : b"numid=6,iface=MIXER,name='Extension Unit Switch',index=1"
Traceback (most recent call last):
File "/home/didier/Musique/scarlett-yaml/scarlett_yaml/scarlett_yaml.py", line 478, in
main()
File "/home/didier/Musique/scarlett-yaml/scarlett_yaml/scarlett_yaml.py", line 468, in main
mixer.load_controls() # prepopulates enums, even for loading.
File "/home/didier/Musique/scarlett-yaml/scarlett_yaml/scarlett_yaml.py", line 169, in load_controls
for name, num_id in sorted(self._extract_controls()):
File "/home/didier/Musique/scarlett-yaml/scarlett_yaml/scarlett_yaml.py", line 405, in _extract_controls
num_id, _, name = line.split(b",")
ValueError: too many values to unpack (expected 3)
Not find a solution yet
The text was updated successfully, but these errors were encountered:
Hello, I dont know how to propose a pull request. I have modified the script to read the missing parameters. I have not modified the yaml file and the load function.
The modified script is here https://github.com/piratebab/scarlett_G1_conf
Helo I am using python3, and a scarlet 18i20. I got an error in extract_controls().
I have add to print to check the problem
def _extract_controls():
dump = subprocess.check_output(
["amixer", "-cUSB", "controls"])
#print(dump)
for line in dump.splitlines():
print("line : ",line)
num_id, _, name = line.split(b",")
_, num_id = num_id.split(b"=")
num_id = int(num_id.decode('ascii'))
_, name = name.split(b"=")
name = name.decode('ascii').strip("'")
print("name = ",name,"num_id =", num_id)
yield name, num_id
it ends with :
line : b"numid=9,iface=MIXER,name='Master Playback Volume'"
name = Master Playback Volume num_id = 9
line : b"numid=1,iface=MIXER,name='Extension Unit Switch'"
name = Extension Unit Switch num_id = 1
line : b"numid=6,iface=MIXER,name='Extension Unit Switch',index=1"
Traceback (most recent call last):
File "/home/didier/Musique/scarlett-yaml/scarlett_yaml/scarlett_yaml.py", line 478, in
main()
File "/home/didier/Musique/scarlett-yaml/scarlett_yaml/scarlett_yaml.py", line 468, in main
mixer.load_controls() # prepopulates enums, even for loading.
File "/home/didier/Musique/scarlett-yaml/scarlett_yaml/scarlett_yaml.py", line 169, in load_controls
for name, num_id in sorted(self._extract_controls()):
File "/home/didier/Musique/scarlett-yaml/scarlett_yaml/scarlett_yaml.py", line 405, in _extract_controls
num_id, _, name = line.split(b",")
ValueError: too many values to unpack (expected 3)
Not find a solution yet
The text was updated successfully, but these errors were encountered: