Local enabled = false ; Extension disabled due to config errors


#1

With a fresh mopidy installation (dist: raspbian-stretch) using a minimal config I get an error for the local config

$ sudo mopidy config

https://pastebin.com/M2gKsxCs

[local] # L82
enabled = false ; Extension disabled due to config errors.
library = json
media_dir = ; Must be set.

But in the configuration file the setting media_dir is set:

/etc/mopidy/mopidy.conf

[local-sqlite]
enabled = false

[local]
media_dir = /var/lib/mopidy/media
excluded_file_extensions = .directory, .html, .jpg, .jpeg, .m3u, .nfo, .png, .txt, .sid, .hvs, .sfv, .ini, .lrc, .url, .scn, .torrent, .gif, .db, .d64, .pls, .pdf, .doc

[m3u]
playlists_dir = "/var/lib/mopidy/playlists"

[mpd]
enabled = true
hostname = ::

[http]
enabled = false
hostname = ::

Path exists and is owned by mopidy:

$ ls -la /var/lib/mopidy/
total 32
drwxr-xr-x  8 mopidy audio 4096 Jun  3 11:54 .
drwxr-xr-x 29 root   root  4096 Jun  3 09:29 ..
drwxr-xr-x  5 mopidy audio 4096 Jun  3 11:54 .cache
drwx------  4 mopidy audio 4096 Jun  3 11:54 .config
drwxr-xr-x  2 mopidy audio 4096 Jan  2  2017 local
drwxr-xr-x  3 mopidy audio 4096 Jun  3 11:54 .local
drwxr-xr-x  2 mopidy audio 4096 Jun  3 10:38 media
drwxr-xr-x  2 mopidy audio 4096 Jan  2  2017 playlists

#2

If you are running as a service you should use sudo mopidyctl config (from the docs)


#3

The config error message appears when running the command with sudo:

pi@rpi-4:~ $ sudo mopidy config

[local]
enabled = false  ; Extension disabled due to config errors.
library = json
media_dir =  ; Must be set.
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
excluded_file_extensions = 
  .directory
  .html
  .jpeg
  .jpg
  .log
  .nfo
  .png
  .txt

#4

But you are not using the right command, the command sudo mopidy config looks at the config file that is usually in the home directory ~/.config/mopidy/mopidy.conf. The command you need, assuming you are running as a service and you want to look at the .conf file at /etc/mopidy/mopidy.conf is sudo mopidyctl config.


#5

@Steve_Lambert thanks for pointing out the difference. Obvious if someone has systemd background :slight_smile:


#6

Config section looks good:

[local]
enabled = true
library = json
media_dir = /var/lib/mopidy/media
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
excluded_file_extensions = 
  .directory
  .html
  .jpg
  .jpeg
  .m3u
  .nfo
  .png
  .txt
  .sid
  .hvs
  .sfv
  .ini
  .lrc
  .url
  .scn
  .torrent
  .gif
  .db
  .d64
  .pls
  .pdf
  .doc

#7

So your problem is now fixed?