Local enabled = false ; Extension disabled due to config errors

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

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

1 Like

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

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.

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

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

So your problem is now fixed?

I’ve got a similar issue (rpi4, ubuntu 19.10, mopidy installed with pipy):

not finding my local files on Musicbox after mounting an external hd to the media folder led me to try mopidy local scan, which indicated that the local extension was disabled.

python3 /usr/local/bin/mopidy config brings up this:

[local]
enabled = false  ; Extension disabled due to config errors.
media_dir =  ; Must be set.
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false

[…]

However, my config files look like this:
under ~/.config/mopidy

[local]
#enabled = true
#library = json
#media_dir = /media

[…]

And under /etc/mopidy

[local]
media_dir = /var/lib/mopidy/media

Changing the media_dir in the latter to match the former didn’t change anything. The config indication of disabled extension persists.

Have you tried without the #? they generally mean ignore this line

Ah ok will try this tonight.

I’m still puzzled by how the default configs are all commented out when installed, but admittedly when customized, I’ve noticed they need to be uncommented to work. Will uncomment the enabled and media_dir keys and see what happens (later today). Thanks!