Streaming Spotify to your Pi - Failed to load URI(s)

followed the guide https://learn.pimoroni.com/tutorial/sandyj/streaming-spotify-to-your-pi without any problems - when using iris im getting “Failed to load URI(s)” when trying to play any music?
i used the noobs install (raspian lite) as suggested and am using the pirate radio kit (zero w + phat beat)

Hey Glenn! Can you try the following, please?

In the terminal, sudo nano /etc/mopidy/mopidy.conf. Scroll down to the bottom, and you should see a section that begins [spotify]. Double-check that the username and password are both correct. If not, then change them to what they should be. Note that in my configuration I’ve used my actual username and not my email address, although I’m not sure if that makes a difference.

Also double-check on the settings page that you’re logged in to Spotify correctly, and that it says “LOG OUT” next to “Authentication”, rather than “LOG IN” and “limited access”.

Hopefully that’ll get you fixed up. :-)

I should have said, I had this same error last night, and it was because my Spotify credentials weren’t correct in the mopidy.conf, so I think it’s highly likely that that’s the problem. Also, double-check that there aren’t any spaces or tabs or newlines or anything after the username and password in that file.

And I assume you do have a Spotify Premium account?

I just checked that conf file and there wasn’t a user and pass in there at all 😀

entered the user / pass and still getting the same error mate

I can see the Spotify account all fine and all the songs available so it’s logged in ok it seems

Did you reboot after changing the credentials? Are the lines uncommented? Mine looks like this:

[spotify]
enabled = true
username = sandyjmacdonald
password = password123
#bitrate = 160
#volume_normalization = true
#private_session = false
#timeout = 10
#allow_cache = true
#allow_network = true
#allow_playlists = true
#search_album_count = 20
#search_artist_count = 10
#search_track_count = 50

You may also need to change it in ~/.config/mopidy/mopidy.conf if that files exists.

THATS IT! they were commented out!

all working now! thanks! :)

Whoop! It’s weird that they didn’t get configured properly during the install process!? Did you enter them while the installation was happening?

yes i followed the guide. entered them when prompted.

Weird. Summoning @RogueM!

withholding sending cake ;)

if the input was somehow unsuitable then writing them to the file would have failed, with message to boot.

Without knowing what the input was, or the error message, I can’t say what went wrong but I suspect some special characters were part of the input - does not mean the script can’t be improved, but right now it merely tries to save one step for users, not be resilient to ‘acts of God’ ;-)

just letters and numbers were inputted, i didn’t notice any error during this step.

one more thing… does the pi zero w wifi work as default in the lite build? or do i need to update it?

I’m not sure I understand that last question, can you rephrase?

do i need to run sudo apt-get update && sudo apt-get upgrade to get the WIFI working ? :) (im currently using ethernet)

i already set this…
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
network={
ssid="YOURSSID"
psk=“YOURPASSWORD”
}

not if the image was fetched from official server this March, no - it’s always a good idea to keep your system up-to-date however.

ok i installed it with the noobs installer, seems it wont connect to my wifi - i shall investigate!