Fornoth / spotify-connect-web

MIT License
435 stars 64 forks source link

Index error when loading Spotify #117

Closed Alootje closed 6 years ago

Alootje commented 7 years ago

I've installed Spotify connect on a OSMC based system including a PHAT DAC. OSMC + Spotify Connect on Rpi over HDMI works on others systems in the house. With the PHAT DAC however I only get audio from media in Kodi but no luck with spotify.

If I try to run the service with the following lines I get an index error listed below ./spotify-connect-web.sh --username [ABCDEFD] --password [123456] --bitrate 320 --name [YOURNAMEHERE] --playback_device sysdefault:CARD=ALSA ./spotify-connect-web.sh -o hw:0 –username [12345678] –password [xyz123] –bitrate 320 –name [any name] ./spotify-connect-web.sh --username [ABCDEFD] --password [123456] --bitrate 320 --name [YOURNAMEHERE] --device 0 --mixer PCM

INDEX ERROR: Loading Spotify library... Traceback (most recent call last): File "main.py", line 15, in from connect import Connect File "/usr/src/app/connect.py", line 9, in from console_callbacks import audio_arg_parser, mixer, error_callback, connection_callbacks, debug_callbacks, playback_callbacks, playback_setup File "/usr/src/app/console_callbacks.py", line 25, 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

Any hint on how I can resolve this IndexError?

Additional information: Hardware: Pi0 + Phat Dac (Pimoroni) Software: OSMC latest (January). PHAT DAC activated in Kodi according https://www.hifiberry.com/build/guides/enabling-hifiberries-in-osmc/ and verified that the settings for the PHAT DAC are correct according https://learn.pimoroni.com/tutorial/phat/raspberry-pi-phat-dac-install : PHAT DAC is recognized as a Hifiberry DAC Also tried the method described in issue 58 (https://github.com/Fornoth/spotify-connect-web/issues/58), no luck either. And tried to edit the config.txt file according https://www.hifiberry.com/blog/configuring-osmc/

Output from aplay -L null Discard all samples (playback) or generate zero samples (capture) softvol 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

If I run Alsamixer I see that the 'Card' is 'snd_rpi_hifiberry_dac' and a message in blue 'This device does not have any controls'. If I run amixer nothing happens.

Fornoth commented 6 years ago

This is a duplicate of #120, so I'll handle tracking of this error there