Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index out of Range #2

Open
DanielKng opened this issue Mar 20, 2017 · 3 comments
Open

Index out of Range #2

DanielKng opened this issue Mar 20, 2017 · 3 comments
Labels

Comments

@DanielKng
Copy link

As i try to use the Start Command:

spotify-connect-web/spotify-connect-web --playback_device hw:1 -m PCM --mixer_device_index 1 --bitrate 320 --name "moOde Connect" --key spotify-connect-web/spotify_appkey.key

in it's form provided by the Readme, i get this error:

Loading Spotify library...
Traceback (most recent call last):
File "loader.py", line 3, in
File "runpy.py", line 180, in run_module
File "runpy.py", line 72, in _run_code
File "/home/pi/spotify/spotify-connect-web/main.py", line 14, in
from connect import Connect
File "/home/pi/spotify/spotify-connect-web/connect.py", line 9, in
from console_callbacks import audio_arg_parser, mixer, error_callback, connection_callbacks, debug_callbacks, playback_callbacks, playback_setup
File "/home/pi/spotify/spotify-connect-web/console_callbacks.py", line 24, in
audio_arg_parser.add_argument('--mixer', '-m', help='alsa mixer name for volume control', default=alsa.mixers()[0])
IndexError: list index out of range
Failed to execute script loader

I already tried changing the mixer_device_index to 0, still the same.

Output of aplay -L:

null
Discard all samples (playback) or generate zero samples (capture)
crossfeed
ladspa
default:CARD=sndrpihifiberry
snd_rpi_hifiberry_dac,
Default Audio Device
sysdefault:CARD=sndrpihifiberry
snd_rpi_hifiberry_dac,
Default Audio Device
dmix:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac,
Direct sample mixing device
dsnoop:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac,
Direct sample snooping device
hw:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac,
Direct hardware device without any conversions
plughw:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac,
Hardware device with all software conversions

I can't fix it, and need help. Thanks!

@RafaPolit
Copy link
Owner

RafaPolit commented Mar 21, 2017

It appears you do not have a hw:1 playback device. Please try changing that to hw:0.

That perhaps also require the mixer to be 0, not sure about that.

You may also need to change the -m PCM to -m Digital as per the instructions suggested by Tim from Moode.

My instructions are meant for USB DACs, I have no onboard DAC or other boards I can test this with! If we find a working scenario for your setup, we could add a case-by-case scenario to help others.

Let me know how it turns out.

Best regards,
Rafa.

@DanielKng
Copy link
Author

Still no luck:

spotify-connect-web/spotify-connect-web --playback_device hw:0 -m Digital --mixer_device_index 0 --bitrate 320 --name "moOde Connect" --key spotify-connect-web/spotify_appkey.key      Loading Spotify library...
Traceback (most recent call last):
  File "loader.py", line 3, in <module>
  File "runpy.py", line 180, in run_module
  File "runpy.py", line 72, in _run_code
  File "/home/pi/spotify/spotify-connect-web/main.py", line 14, in <module>
    from connect import Connect
  File "/home/pi/spotify/spotify-connect-web/connect.py", line 9, in <module>
    from console_callbacks import audio_arg_parser, mixer, error_callback, connection_callbacks, debug_callbacks, playback_callbacks, playback_setup
  File "/home/pi/spotify/spotify-connect-web/console_callbacks.py", line 24, in <module>
    audio_arg_parser.add_argument('--mixer', '-m', help='alsa mixer name for volume control', default=alsa.mixers()[0])
IndexError: list index out of range
Failed to execute script loader

@RafaPolit
Copy link
Owner

Did you ever manage to get this sorted out? You could try without hw:0 but the actual names? Or default?

Really not sure what else to try.

Best regards,
Rafa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants