Spotify Config File Error

I cannot get Mopidy to run spotify at all it just says:

INFO Enabled extensions: local, mpd, softwaremixer, http, stream
INFO Disabled extensions: spotify
WARNING Found spotify configuration errors, the extension has been automatically disabled:
WARNING spotify/username must be set.
WARNING spotify/password must be set.
WARNING Please fix the extension configuration errors or disable the extensions to silence these messages.

However I have set my username and password so this should not be occurring. Please help.

Where exactly did you set your Spotify username and password? Do the files have the correct permission for the user that Mopidy runs at? Have you read https://docs.mopidy.com/en/latest/debian/#differences-when-running-as-a-system-service ?

I set them in the config file at .config/mopidy/mopidy.config. And I read that link, although I didn't completely understand it.

Do you mean /home/<username>/.config/mopidy/mopidy.config ? Are you trying to run Mopidy as a system service (starts automatically, runs in the background) or are you manually running it in the terminal? If you are running Mopidy as a system service you need to understand that the config comes from /etc/mopidy/mopidy.conf.

I am trying to run it manually in the terminal but every time I do it just gives me that same error message.

Right, I only just realised what you wrote above, the file must be called mopidy.conf (not mopidy.config). Please ensure you edited the correct file and it’s in the correct place (~/.config/mopidy/mopidy.conf). When you start Mopidy in the terminal it will print out which config files it is using so make sure it’s picking up yours.

Yes I know that I need to edit the file in ~/.config/mopidy/.mopidy.conf
Here I have posted what I get when i type in mopidy config in the terminal

[logging]
color = true
console_format = %(levelname)-8s %(message)s
debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s
debug_file = mopidy.log
config_file =

[audio]
mixer = software
mixer_volume =
output = autoaudiosink
visualizer =

[proxy]
scheme =
hostname =
port =
username =
password =

[spotify]
enabled = false ; Extension disabled due to config errors.
username = ; Must be set.
password = ; Must be set.
bitrate = 160
timeout = 10
cache_dir = $XDG_CACHE_DIR/mopidy/spotify
settings_dir = $XDG_CONFIG_DIR/mopidy/spotify
toplist_countries =
AD
AR
AU
AT
BE
CO
CY
DK
EE
FI
FR
DE
GR
HK
IS
IE
IT
LV
LI
LT
LU
MY
MX
MC
NL
NZ
NO
PT
ES
SG
SE
CH
TW
TR
GB
US

[http]
enabled = true
hostname = 127.0.0.1
port = 6680
static_dir =
zeroconf = Mopidy HTTP server on $hostname

[mpd]
enabled = true
hostname = 127.0.0.1
port = 6600
password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname

[softwaremixer]
enabled = true

[local]
enabled = true
library = json
media_dir = $XDG_MUSIC_DIR
data_dir = $XDG_DATA_DIR/mopidy/local
playlists_dir = $XDG_DATA_DIR/mopidy/local/playlists
scan_timeout = 1000
scan_flush_threshold = 1000
excluded_file_extensions =
.directory
.html
.jpeg
.jpg
.log
.nfo
.png
.txt

[stream]
enabled = true
protocols =
file
http
https
mms
rtmp
rtmps
rtsp
metadata_blacklist =
timeout = 5000

But in the .conf file I have put in my username and password and I have confirmed those are the correct username and password by logging out and logging back in.

Presumably you mean ~/.config/mopidy/mopidy.conf
Your Spotify username and password obviously have to be under the [spotify] section in that file. Perhaps, for sanity’s sake, you could try changing some other setting and checking it’s picked up with mopidy config? For example, disabling the mpd frontend. And again, check what files it says it’s loading when you start Mopidy.

Okay so I disabled MPD and when I run mopidy in the terminal I get this

INFO Starting Mopidy 0.19.4
INFO Loading config from: builtin defaults, /etc/xdg/xdg-gnome/mopidy/mopidy.conf, /usr/share/upstart/xdg/mopidy/mopidy.conf, /etc/xdg/mopidy/mopidy.conf, /home/arctic/.config/mopidy/mopidy.conf, command line options
INFO Enabled extensions: local, mpd, softwaremixer, http, stream
INFO Disabled extensions: spotify
WARNING Found spotify configuration errors, the extension has been automatically disabled:
WARNING spotify/username must be set.
WARNING spotify/password must be set.
WARNING Please fix the extension configuration errors or disable the extensions to silence these messages.
INFO Starting Mopidy mixer: SoftwareMixer
INFO Mixing using GStreamer software mixing
INFO Starting Mopidy audio
INFO Starting Mopidy backends: LocalBackend, StreamBackend
INFO Loaded 0 local playlists from /home/arctic/.local/share/mopidy/local/playlists
INFO Loaded 0 local tracks using json
INFO Audio output set to "autoaudiosink"
INFO Starting Mopidy core
INFO Starting Mopidy frontends: HttpFrontend, MpdFrontend
INFO HTTP server running at [::ffff:127.0.0.1]:6680
INFO MPD server running at [::ffff:127.0.0.1]:6600

So it seems to me that it didn’t detect that I changed MPD to false

Ok so I purged the spotify plugin as welled as mopidy and now it works.

Weird but OK, great!

Hello, sorry for reviving an old thread but I figure since I’m going through the exact same problem there’s no point in creating a new one. I tried reinstalling the whole package but it did nothing. Any other suggestion you guys may have?

thank you

You’ll have to provide more details.

How did you install Mopidy? APT/pip/Homebrew?

What extensions have you installed? How?

Did you update the config file with the Spotify username and password? What’s the exact path to the config file you updated?

What’s the output of mopidy config?

What’s the output of mopidy deps?

Sure, sorry for that!

I installed it following the instructions here and here, it’s runing manually (so no system service).
I installed the Spotify extension, following the same instructions found there. The path to my .conf file is the exact one Kris_Pennington described: /home/pi/.config/mopidy/mopidy.conf (yes my username is pi).
So whenever I browse to that file I find it edited with the settings I introduced: mu username/password for Spotify and a password for MPD. However when I execute mopidy config is shows me the same file but with no pass for the MPD and Spotify sections looks like this in there:

Finally, my mopidy deps output looks like this:

Platform: Linux-3.6.11+-armv6l-with-debian-7.1
Python: CPython 2.7.3 from /usr/lib/python2.7
Mopidy: 0.19.5 from /usr/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.0 from /usr/lib/python2.7/dist-packages
  tornado>=2.3: 2.3 from /usr/lib/python2.7/dist-packages
Mopidy-Spotify: 1.2.0 from /usr/share/mopidy
  Mopidy>=0.18: 0.19.5 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.0 from /usr/lib/python2.7/dist-packages
    tornado>=2.3: 2.3 from /usr/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.0 from /usr/lib/python2.7/dist-packages
  pyspotify>=1.9,<1.999: 1.11 from /usr/lib/pymodules/python2.7
GStreamer: 0.10.36.0 from /usr/lib/python2.7/dist-packages/gst-0.10/gst
  Detailed information:
    Python wrapper: gst-python 0.10.22.0
    Relevant elements:
      Found:
        uridecodebin
        souphttpsrc
        appsrc
        alsasink
        osssink
        oss4sink
        id3demux
        id3v2mux
        lame
        mad
        mp3parse
        vorbisdec
        vorbisenc
        vorbisparse
        oggdemux
        oggmux
        oggparse
        flacdec
        flacparse
        shout2send
      Not found:
        pulsesink
        flump3dec

Can you provide your config file? Feel free to fake passwords.

yeah sure

# For further information about options in this file see:
#   http://docs.mopidy.com/
#
# The initial commented out values reflect the defaults as of:
#   Mopidy 0.19.5
#   Mopidy-HTTP 0.19.5
#   Mopidy-Local 0.19.5
#   Mopidy-MPD 0.19.5
#   Mopidy-SoftwareMixer 0.19.5
#   Mopidy-Spotify 1.2.0
#   Mopidy-Stream 0.19.5
#
# Available options and defaults might have changed since then,
# run `mopidy config` to see the current effective config and
# `mopidy --version` to check the current version.

[logging]
#color = true
#console_format = %(levelname)-8s %(message)s
#debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name$
#debug_file = mopidy.log
#config_file =

[audio]
#mixer = software
#mixer_volume =
#output = autoaudiosink
#visualizer =

[proxy]
#scheme =
#hostname =
#port =
#username =
#password =

[spotify]
#enabled = true
#username = myusername
#password = mypassword
#bitrate = 160
#timeout = 10
#cache_dir = $XDG_CACHE_DIR/mopidy/spotify
#settings_dir = $XDG_CONFIG_DIR/mopidy/spotify
#toplist_countries =
#  AD
#  AR
#  AU
#  AT
#  BE
#  CO
#  CY
#  DK
#  EE
#  FI
#  FR
#  DE
#  GR
#  HK
#  IS
#  IE
#  IT
#  LV
#  LI
#  LT
#  LU
#  MY
#  MX
#  MC
#  NL
#  NZ
#  NO
#  PT
#  ES
#  SG
#  SE
[http]
#enabled = true
#hostname = 127.0.0.1
#port = 6680
#static_dir =
#zeroconf = Mopidy HTTP server on $hostname

[mpd]
#enabled = true
#hostname = 127.0.0.1
#port = 6600
#password = mpdpass
#max_connections = 20
#connection_timeout = 60
#zeroconf = Mopidy MPD server on $hostname

[softwaremixer]
#enabled = true

[local]
#enabled = true
#library = json
#media_dir =
#data_dir = $XDG_DATA_DIR/mopidy/local
#playlists_dir = $XDG_DATA_DIR/mopidy/local/playlists
#scan_timeout = 1000
#scan_flush_threshold = 1000
#excluded_file_extensions =
#  .directory
#  .html
#  .jpeg
#  .jpg
#  .log
#  .nfo
#  .png
#  .txt

[stream]
#enabled = true
#protocols =
#  file
#  http
#  https
#  mms
#  rtmp
#  rtmps
#  rtsp
#metadata_blacklist =
#timeout = 5000

The # is used to comment so the lines with # are not used.
So instead of:

[spotify]
#enabled = true
#username = myusername
#password = mypassword

Use:

[spotify]
enabled = true
username = myusername
password = mypassword

The commented out lines which are prepopulated are the defaults, so if you don’t change the value you are recommended to keep it commented out, so you’ll get updated defaults with new releases.

E.g. enabled = true is redundant, as that is the default value.

oh I feel so dumb, I knew about the commented lines thing, I just didn’t realize it was doing that as the whole document was commented. Anyway, thank you all, Spotify seems to be working now!

Hello thanks a lot for making Mopidy

Can somebody help me to get it working with spotify?

INFO Starting Mopidy 2.1.0
INFO Loading config from builtin defaults
INFO Loading config from /home/pi/.config/mopidy/mopidy.conf
INFO Loading config from command line options
INFO Enabled extensions: iris, mpd, http, stream, m3u, softwaremixer, file, local-images
INFO Disabled extensions: spotify, local
WARNING Found local configuration errors, the extension has been automatically disabled:
WARNING local/media_dir must be set.
WARNING Found spotify configuration errors, the extension has been automaticall y disabled:
WARNING spotify/username must be set.
WARNING spotify/client_secret must be set.
WARNING spotify/password must be set.
WARNING spotify/client_id must be set.
WARNING Please fix the extension configuration errors or disable the extensions to silence these messages.
INFO Starting Mopidy mixer: SoftwareMixer
INFO Starting Mopidy audio
INFO Starting Mopidy backends: StreamBackend, M3UBackend, FileBackend
INFO Audio output set to “autoaudiosink”
INFO Starting Mopidy core
INFO Starting Mopidy frontends: IrisFrontend, MpdFrontend, HttpFrontend
INFO Starting Iris 3.8.9
ERROR Frontend (MpdFrontend) initialization error: MPD server startup failed: [Errno 98] Address already in use
ERROR Frontend (HttpFrontend) initialization error: HTTP server startup faile d: [Errno 98] Address already in use
INFO Starting GLib mainloop

My config file. Off course i understand that i have to fill in my right credentials.
Before starting Mopidy, you must add your Spotify Premium username and password to your Mopidy configuration file and also visit this extension against your Spotify account:

Example:
[spotify]
username = alice
password = secret
client_id = … client_id value you got from mopidy.com
client_secret = … client_secret value you got from mopidy.com

For further information about options in this file see:

The initial commented out values reflect the defaults as of:

Mopidy 2.1.0

Mopidy-File 2.1.0

Mopidy-HTTP 2.1.0

Mopidy-Iris 3.8.9

Mopidy-Local 2.1.0

Mopidy-Local-Images 1.0.0

Mopidy-M3U 2.1.0

Mopidy-MPD 2.1.0

Mopidy-SoftwareMixer 2.1.0

Mopidy-Spotify 3.1.0

Mopidy-Stream 2.1.0

Available options and defaults might have changed since then,

run mopidy config to see the current effective config and

mopidy --version to check the current version.

[core]
#cache_dir = $XDG_CACHE_DIR/mopidy
#config_dir = $XDG_CONFIG_DIR/mopidy
#data_dir = $XDG_DATA_DIR/mopidy
#max_tracklist_length = 10000
#restore_state = false

[logging]
#color = true
#console_format = %(levelname)-8s %(message)s
#debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s
#debug_file = mopidy.log
#config_file =

[audio]
#mixer = software
#mixer_volume =
#output = autoaudiosink
#buffer_time =

[proxy]
#scheme =
#hostname =
#port =
#username =
#password =

[local-images]
#enabled = true
#library = json
#base_uri = /images/
#image_dir =
#album_art_files =

*.jpg

*.jpeg

*.png

[iris]
#enabled = true
#country = NZ
#locale = en_NZ
#spotify_authorization_url =
#lastfm_authorization_url =

[mpd]
#enabled = true
#hostname = 192.168.2.207
#port = 6600
#password =
#max_connections = 20
#connection_timeout = 60
#zeroconf = Mopidy MPD server on $hostname
#command_blacklist =

listall

listallinfo

#default_playlist_scheme = m3u

[http]
#enabled = true
#hostname = 192.168.2.207
#port = 6680
#static_dir =
#zeroconf = Mopidy HTTP server on $hostname

[stream]
#enabled = true
#protocols =

http

https

mms

rtmp

rtmps

rtsp

#metadata_blacklist =
#timeout = 5000

[m3u]
#enabled = true
#base_dir =
#default_encoding = latin-1
#default_extension = .m3u8
#playlists_dir =

[softwaremixer]
#enabled = true

[file]
#enabled = true
#media_dirs =

$XDG_MUSIC_DIR|Music

~/|Home

#excluded_file_extensions =

.jpg

.jpeg

#show_dotfiles = false
#follow_symlinks = false
#metadata_timeout = 1000

[local]
#enabled = true
#library = json
#media_dir =
#scan_timeout = 1000
#scan_flush_threshold = 100
#scan_follow_symlinks = false
#excluded_file_extensions =

.directory

.html

.jpeg

.jpg

.log

.nfo

.png

.txt

[spotify]
#enabled = true
#username = username
#password = password
#client_id = serects
#client_secret = secrets
#bitrate = 160h
#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
#toplist_countries =