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

[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!

This should be made clear in KB pages such as this: https://docs.mopidy.com/en/release-2.2/ext/local/
Most people use Mopidy as a service anyway

cheers

Hello

I have a similar problem as users above, when i run mopidy local scan
it tells me that Local is disabled but I do not agree with that so I need some help to solve this.

First of all my hardware : Rpi3b+ , Iqaudio dacplus ,external hdd.
And Mopidy: 3.1.1 is installed above Dietpi v6.34.3

And here is my mopidy config

[local]
enabled = true
max_search_results = 100
media_dir = /mnt/020de8b5-0e97-42d2-b156-5fc7466bd629
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
included_file_extensions =
excluded_file_extensions =
  .cue
  .directory
  .html
  .jpeg
  .jpg
  .log
  .nfo
  .pdf
  .png
  .txt
  .zip
directories =
  Albums                  local:directory?type=album
  Artists                 local:directory?type=artist
  Composers               local:directory?type=artist&role=composer
  Genres                  local:directory?type=genre
  Performers              local:directory?type=artist&role=performer
  Release Years           local:directory?type=date&format=%25Y
  Tracks                  local:directory?type=track
  Last Week's Updates     local:directory?max-age=604800
  Last Month's Updates    local:directory?max-age=259200
timeout = 10
use_artist_sortname = false
album_art_files =
  *.jpg
  *.jpeg
  *.png

And if i run as above Mopidy Local Scan i get this answer

[WARNING  2021-01-12 21:11:39,885 [28720:MainThread] mopidy.__main__
  Found local configuration errors. The extension has been automatically disabled:
WARNING  2021-01-12 21:11:39,885 [28720:MainThread] mopidy.__main__
    local/media_dir must be set.
WARNING  2021-01-12 21:11:39,886 [28720:MainThread] mopidy.__main__
  Found spotify configuration errors. The extension has been automatically disabled:
WARNING  2021-01-12 21:11:39,886 [28720:MainThread] mopidy.__main__
    spotify/username must be set.
WARNING  2021-01-12 21:11:39,886 [28720:MainThread] mopidy.__main__
    spotify/password must be set.
WARNING  2021-01-12 21:11:39,886 [28720:MainThread] mopidy.__main__
    spotify/client_id must be set.
WARNING  2021-01-12 21:11:39,887 [28720:MainThread] mopidy.__main__
    spotify/client_secret must be set.
WARNING  2021-01-12 21:11:39,887 [28720:MainThread] mopidy.__main__
  Please fix the extension configuration errors or disable the extensions to silence these messages.
ERROR    2021-01-12 21:11:39,887 [28720:MainThread] mopidy.__main__
  Unable to run command provided by disabled extension local

And what I can see in mopidy.conf i have set /mnt/020de8b5-0e97-42d2-b156-5fc7466bd629 (yes thats the real name because of noob) as media_dir , but I cant tell if /mnt/020de8b5-0e97-42d2-b156-5fc7466bd629 has right read/write user thingy. But it works for Mopidy-File.

But lets get it on

I also run command sudo journalctl -u mopidy

And get alot of information maybe i post later, I will just figure out how, but here is a small part
from I stopped mopidy service and start over again

[Jan 12 21:10:42 MopidyNest systemd[1]: Started Mopidy music server.
Jan 12 21:10:44 MopidyNest mopidy[28680]: INFO     [MainThread] mopidy.__main__ Starting Mopidy 3.1.1
Jan 12 21:10:44 MopidyNest mopidy[28680]: INFO     [MainThread] mopidy.config Loading config from builtin defaults
Jan 12 21:10:44 MopidyNest mopidy[28680]: INFO     [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy-local.conf
Jan 12 21:10:44 MopidyNest mopidy[28680]: INFO     [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy.conf
Jan 12 21:10:44 MopidyNest mopidy[28680]: INFO     [MainThread] mopidy.config Loading config from file:///etc/mopidy/mopidy.conf
Jan 12 21:10:44 MopidyNest mopidy[28680]: INFO     [MainThread] mopidy.config Loading config from command line options
Jan 12 21:10:44 MopidyNest mopidy[28680]: ERROR    [MainThread] mopidy.internal.log Loading logging config '/etc/mopidy/logging.conf' failed. 'formatters'
Jan 12 21:10:45 MopidyNest mopidy[28680]: INFO     [MainThread] mopidy.__main__ Enabled extensions: iris, http, stream, musicbox_webclient, file, spotify, m3u, softwaremixer, tunein, local
Jan 12 21:10:45 MopidyNest mopidy[28680]: INFO     [MainThread] mopidy.__main__ Disabled extensions: none
Jan 12 21:10:45 MopidyNest mopidy[28680]: INFO     [MainThread] mopidy.commands Starting Mopidy mixer: SoftwareMixer
Jan 12 21:10:45 MopidyNest mopidy[28680]: INFO     [MainThread] mopidy.commands Starting Mopidy audio
Jan 12 21:10:45 MopidyNest mopidy[28680]: INFO     [MainThread] mopidy.commands Starting Mopidy backends: TuneInBackend, FileBackend, M3UBackend, StreamBackend, SpotifyBackend, LocalBackend
Jan 12 21:10:45 MopidyNest mopidy[28680]: INFO     [Audio-2] mopidy.audio.actor Audio output set to "audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! wavenc ! filesink location
=/tmp/snapfifo"
Jan 12 21:10:46 MopidyNest mopidy[28680]: INFO     [SpotifyEventLoop] mopidy_spotify.backend Logged in to Spotify in online mode
Jan 12 21:10:47 MopidyNest mopidy[28680]: INFO     [SpotifyBackend-7] mopidy_spotify.web Logged into Spotify Web API as skogssnoken82
Jan 12 21:11:45 MopidyNest mopidy[28680]: INFO     [SpotifyBackend-7] mopidy_spotify.playlists Refreshed 68 Spotify playlists
Jan 12 21:11:45 MopidyNest mopidy[28680]: INFO     [MainThread] mopidy.commands Starting Mopidy core
Jan 12 21:11:45 MopidyNest mopidy[28680]: INFO     [MainThread] mopidy.commands Starting Mopidy frontends: IrisFrontend, HttpFrontend
Jan 12 21:11:45 MopidyNest mopidy[28680]: INFO     [IrisFrontend-12] mopidy_iris.core Starting Iris 3.55.4
Jan 12 21:11:45 MopidyNest mopidy[28680]: INFO     [HttpFrontend-14] mopidy.http.actor HTTP server running at [::]:6680
Jan 12 21:11:45 MopidyNest mopidy[28680]: INFO     [MainThread] mopidy.commands Starting GLib mainloop
Jan 12 21:12:00 MopidyNest mopidy[28680]: ERROR    [M3UBackend-5] mopidy.m3u.playlists Error reading playlist 'm3u:%5BRadio%20Streams%5D.m3u8': Permission denied
Jan 12 21:12:28 MopidyNest mopidy[28680]: ERROR    [M3UBackend-5] mopidy.m3u.playlists Error reading playlist 'm3u:%5BRadio%20Streams%5D.m3u8': Permission denied
Jan 12 21:12:33 MopidyNest mopidy[28680]: ERROR    [LocalBackend-8] mopidy_local.library Error browsing local:directory?type=album: no such table: album

And found this config in path [ /usr/share/mopidy/conf.d/mopidy-local.conf] and in nano editor it points to /var/lib/mopidy/media , so what is this shall I also changed this to /mnt/mymediadisk or does it go hand in hand with changes I make in mopidy.conf.

So with that said what shall I do to make Mopidy-Local work.

Regards /David

If running Mopidy as a service then you need to edit the config file at /etc/mopidy/mopidy.conf and you need to run sudo mopidyctl local scan.

OH!! thanks missed that command, after I typed my rpi went scanning my entire drive, and album,artist etc etc went populated.

Thanks for yout help!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.