Mopidy.conf does not have a config section, not loaded

Hi all,
I installed mopidy on a raspberry pi , installed spotify plugin also.
when i launch the prog i get the following error:
WARNING /home/pi/.config/mopidy/mopidy.conf does not have a config section, not loaded.
i reviewed the file but there seem to be no errors.
So here’s my mopidy.con file:

pi@raspbmc:~$ cat  /home/pi/.config/mopidy/mopidy.conf
!# For further information about options in this file see:
#   http://docs.mopidy.com/
#
# The initial commented out values reflect the defaults as of:
#   Mopidy 1.0.4
#   Mopidy-HTTP 1.0.4
#   Mopidy-Local 1.0.4
#   Mopidy-M3U 1.0.4
#   Mopidy-MPD 1.0.4
#   Mopidy-SoftwareMixer 1.0.4
#   Mopidy-Stream 1.0.4
#
# 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)s\n  %(message)s
#debug_file = mopidy.log
#config_file =

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

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

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

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

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

[spotify]
enabled = true
username = xxxxx
password = xxxxx
bitrate = 320
timeout = 10
cache_dir = $XDG_CACHE_DIR/mopidy/spotify

[m3u]
#enabled = true
#playlists_dir = $XDG_DATA_DIR/mopidy/m3u

[softwaremixer]
#enabled = true

[local]
#enabled = true
#library = json
#media_dir = $XDG_MUSIC_DIR
#data_dir = $XDG_DATA_DIR/mopidy/local
#scan_timeout = 1000
#scan_flush_threshold = 1000
#scan_follow_symlinks = false
#excluded_file_extensions = 
#  .directory
#  .html
#  .jpeg
#  .jpg
#  .log
#  .nfo
#  .png
#  .txt
pi@raspbmc:~$ 

any hints?

Thanks a lot!!

Try removing the exclamation mark at the start.

Also, this isn’t anything to do with pimusicbox so I’ve moved it.

For future reference, the erroneous exclamation mark at the start of the config file was the issue. We concluded it must have been added accidentally whilst editing the file.

I have the exact same problem. I’m using PiMusicBox. It was working great till I moved it to my sister’s place and changed the wifi and the spotify credentials. Neither the webclient or the spotify playing is working. Local mpd works good.

Any Ideas?
Here is my /var/log/musicbox_startup.log

************************
Initializing MusicBox...
************************
Setting sound configuration...
Probing sound devices:
* Found internal device: card0
* Found internal device: card0
* Found unknown device 'sndrpihifiberrydac' on card1
Probing sound devices:
* Found internal device: card0
* Found internal device: card0
* Found i2s device: card1
Selected card=1  (i2s=1  output=hifiberry-dac  usb=1  intc=0)
Using audio card1 (hifiberry-dac)
MusicBox name is MusicBox
ifup: interface wlan0 already configured
Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces ... (warning).
Reconfiguring network interfaces...Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/b8:27:eb:cc:5e:19
Sending on   LPF/wlan0/b8:27:eb:cc:5e:19
Sending on   Socket/fallback
DHCPRELEASE on wlan0 to 192.168.2.1 port 67
Reloading /etc/samba/smb.conf: smbd only.
done.
Stopping Samba daemons: nmbd smbd.
Starting Samba daemons: nmbd smbd.
Starting Dropbear SSH server: dropbear.
Starting Spotify Connect : librespot.
Starting daemon monitor: monit.
Scanning music-files, please wait...
INFO     Starting Mopidy 1.1.2
INFO     Loading config from builtin defaults
INFO     Loading config from /etc/mopidy/mopidy.conf
WARNING  /etc/mopidy/mopidy.conf does not have a config section, not loaded.
INFO     Loading config from command line options
INFO     Enabled extensions: file, stream, spotify_tunigo, http-kuechenradio, podcast-itunes, softwaremixer, moped, musicbox_webclient, websettings, tunein, mopify, somafm, internetarchive, mpd, http, podcast, alsamixer, mobile, local-sqlite, youtube, simple-webclient, m3u, audioaddict
INFO     Disabled extensions: spotify, gmusic, scrobbler, spotify_web, dirble, local, soundcloud
WARNING  Found dirble configuration errors, the extension has been automatically disabled:
WARNING    dirble/api_key must be set.
WARNING  Found gmusic configuration errors, the extension has been automatically disabled:
WARNING    gmusic/username must be set.
WARNING    gmusic/password must be set.
WARNING  Found local configuration errors, the extension has been automatically disabled:
WARNING    local/media_dir must be set.
WARNING  Found scrobbler configuration errors, the extension has been automatically disabled:
WARNING    scrobbler/username must be set.
WARNING    scrobbler/password must be set.
WARNING  Found soundcloud configuration errors, the extension has been automatically disabled:
WARNING    soundcloud/auth_token must be set.
WARNING  Found spotify configuration errors, the extension has been automatically 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  Found spotify_web configuration errors, the extension has been automatically disabled:
WARNING    spotify_web/client_secret must be set.
WARNING    spotify_web/client_id must be set.
WARNING  Please fix the extension configuration errors or disable the extensions to silence these messages.
ERROR    Unable to run command provided by disabled extension local
***********************************************************************************
My IP address is 192.168.2.103
Connect to me in your browser at http://MusicBox.local or http://192.168.2.103
***********************************************************************************
starting python scripts
started gpio_control.py
started box.py

And here is my /etc/mopidy/mopidy.conf

#################################
# Pi MusicBox / Mopidy Settings #
#################################
#
# Edit the settings of your MusicBox and the Mopidy music server here
# This is a file read by both the MusicBox startup-scripts and Mopidy.
# For more info on the settings of Mopidy: http://docs.mopidy.com/en/latest/config/
# or the particular extenion's GitHub page
#
# Every line starting with a # is a comment, it does not do anything until you remove the #

# --------------------
# | Network Settings |
# --------------------
[network]
# Settings for your WiFi network, if you use a (supported) wifi-dongle
# Only supports WPA security, no WEP or access points without security (dive into the command line for that!)
wifi_network = ****
wifi_password = ****
# Optionally set the wifi region for correct regulatory configuration (available channels etc.)
# Use the ISO / IEC 3166 alpha2 country code, e.g. wifi_country = GB
wifi_country = DE

# Set the name of the MusicBox.
# In this way you can identify and access different devices on the same network e.g. across different rooms.
# A MusicBox device named kitchen would be accessible from a web browser at http://kitchen.local/, from an MPD
# client at kitchen.local and advertised as kitchen on AirTunes.
# The name is restricted to a maximum of 9 alphanumeric characters (no spaces, dots, etc).
# You can even have different devices with different Spotify accounts when needed.
name = MusicBox

# Mount Windows Network Drive on boot (via samba/cifs)
# The address is exactly how Samba mount works: //servername/mountpoint/directory
# e.g. //192.168.1.5/musicmount or //server.local/shared/music
# if the mount needs a username/password, also set it (leave empty for guest-access)
# Don't forget to let Mopidy/MusicBox scan the contents at first boot (see below)
mount_address = ""
mount_user = ""
mount_password = ""

# Here you can change the default workgroup of the Windows network.
# This will set the workgroup to the name you want
workgroup = WORKGROUP

# Enable this to allow remote login via SSH on MusicBox
enable_ssh = true

# Enable this to block network connections on ports other than those explicitly
# required by Musicbox. This may prevent any additional network programs from working correctly.
# This should be enabled **alongside other security hardening methods** if
# using Musicbox outside of your LAN (not recommended).
enable_firewall = false

# By default, MusicBox waits for the network to come up, since there is not much to do without a network.
# If you want to skip this, e.g. for testing purposes, uncomment this line
wait_for_network = true

# -----------
# | Spotify |
# -----------
# https://github.com/mopidy/mopidy-spotify
[spotify]
# Supply your PREMIUM account credentials to enable Spotify
enabled = true
username = ****
password = ****
# ALSO supply your credentials obtained from https://www.mopidy.com/authenticate
client_id = ****
client_secret = ****
# The bitrate, the quality of the music played by Spotify, can be set to 96, 160 (default) or 320
bitrate = 160
cache_dir = ""

# ---------------
# | Spotify-Web |
# ---------------
# https://github.com/lfcabend/mopidy-spotify-web
# Supply same client credentials as Spotify above
[spotify_web]
enabled = true
client_id = ****
client_secret = ****

# -----------
# | Last.fm |
# -----------
# https://github.com/mopidy/mopidy-scrobbler
# Supply your credentials to scrobble tracks to Last.fm
[scrobbler]
enabled = false
username = ""
password = ""

# --------------
# | SoundCloud |
# --------------
# https://github.com/mopidy/mopidy-soundcloud
# Supply your auth_token obtained from https://www.mopidy.com/authenticate
[soundcloud]
enabled = false
auth_token = ""

# ----------------
# | Google Music |
# ----------------
# https://github.com/hechtus/mopidy-gmusic
# Supply your credentials to enable Google Music
# NOTE: If enabled this may slow down the start of MusicBox. Please be patient
[gmusic]
enabled = false
username = ""
password = ""
deviceid = ""

# -----------
# | YouTube |
# -----------
# https://github.com/dz0ny/mopidy-youtube
# Play music from Youtube
# NOTE: Search is currently broken!
[youtube]
enabled = true

# ----------
# | Dirble |
# ----------
# https://github.com/mopidy/mopidy-dirble
# Play radio stations from Dirble
[dirble]
enabled = true
api_key = 473279e3fa0e7010cbbbb40ecc31890d46e57a2e
countries = US, NL, DE, NO, SE

# ----------------
# | TuneIn Radio |
# ----------------
# https://github.com/kingosticks/mopidy-tunein
# Play radio stations from TuneIn
[tunein]
enabled = true

# ------------------------
# | The Internet Archive |
# ------------------------
# http://mopidy-internetarchive.readthedocs.org/en/latest/config.html
# Listen to sounds and music from the Internet Archive
[internetarchive]
enabled = false

# -----------
# | Soma FM |
# -----------
# https://github.com/AlexandrePTJ/mopidy-somafm
# Play radio stations from Soma FM
[somafm]
enabled = false
encoding = mp3
quality = fast

# -----------
# | Podcast |
# -----------
# http://mopidy-podcast.readthedocs.io/en/v2.0.1/
# Browse podcasts distributed as RSS feeds and play individual episodes in a variety of audio formats
# Edit the subscription file at /boot/config/Podcasts.opml
[podcast]
enabled = true

# WARNING: Do not add settings for [podcast-itunes]
# because it breaks the startup script (won't read dashes in section names)

# ---------------
# | AudioAddict |
# ---------------
# https://github.com/nilicule/mopidy-audioaddict
# Play music from all the AudioAddict network of sites (login optional)
[audioaddict]
enabled = false
quality = 40k
difm = false
radiotunes = false
rockradio = false
jazzradio = false
frescaradio = false


# ---------------------
# | MusicBox Settings |
# ---------------------
[musicbox]
# To secure your device, change the default password to something else.
# For security, the value in this file will be automatically cleaned out when the password is set in MusicBox
root_password = ""

# Automatically resize the filesystem and use all available space on your SD card.
# Use at your own risk, you could lose data on your card.
# (If so, you can put the original MusicBox image on it again and start over)
resize_once = false

# Scan on startup for new music files on the SD card or the network shares (could take a while!).
# Local files work ok for moderate size collections. Large music database sizes could cause problems.
# IMPORTANT: if you enable scan_always this will scan on every boot.
# If your music doesn't change or you only stream music set scan_once instead.
#scan_once = true
scan_always = true

# MusicBox can automatically start playing a stream/song after startup.
# It will wait up to autoplaymaxwait seconds before trying to do so for the system to first become ready.
# The wait required varies per device, network and configuration so if it doesn't work then increase the time.
# e.g. autoplay = http://nprdmp.ic.llnwd.net/stream/nprdmp_live01_mp3 or local:track:MusicBox/Music%20File.mp3 (on the SD Card)
autoplay = ""
autoplaymaxwait = 60

# -------------
# -------------
# | Webclient |
# -------------
# Here you can change the default webclient from musicbox_webclient to something else.
# Options: musicbox_webclient, moped, mobile, mopify, simple-webclient, kuechenradio
webclient = musicbox_webclient

# Monitor playback to automatically restart internet streams following connectivity issues.
enable_mpd_watchdog = ""

# -------------
# | Streaming |
# -------------
# Set these options to enable streaming to Pi MusicBox
# AirTunes (using Shairport-sync):
enable_shairport = false

# DLNA/uPnP/OpenHome (using upmpdcli):
enable_upnp = true

# Spotify Connect support (using librespot) ** BETA**
enable_connect = true

# ------------------
# | Audio Settings |
# ------------------
# Because of limitations with some USB-DACs, MusicBox downsamples USB sound to 44k by default. Set to false to disable.
downsample_usb = true

# Set default system audio output. This overrides the automatic detection (which sets to usb audio if a usb audio device
# is found, else to hdmi (if hdmi is connected at boot), and otherwise just to the analog out).
# i2s cards (e.g. HifiBerry etc) are not detected automatically and must be explicitly set here.
# Options: analog, hdmi, usb, hifiberry_dac, hifiberry_digi, hifiberry_dacplus, hifiberry_amp, iqaudio_dacplus, justboom_dac, justboom_digi
# If you don't know what to put here then use websettings instead.
output = hifiberry_dac
enable_stream_watchdog = false

# --------------------------------------------------------------------------
# | OTHER Settings                                                         |
# | You probably don't want to edit the settings below this line. Really.  |
# | Unless you know what you're doing.                                     |
# --------------------------------------------------------------------------
[audio]
# This is Mopidy's audio volume. Other applications do not use this.
mixer_volume = 85

# This sets the gstreamer buffer. It's a bit tricky...
# If you have problems with stuttering sound, try other values here, like:
#output = alsasink buffer-time=300000 latency-time=20000
#output = alsasink buffer-time=200000 latency-time=10000
output = alsasink

mixer = software

# Optionally, you can use alsamixer to enable your usb/audiocard hardware mixer (if available).
# To use this, set the previous setting to 'mixer = alsamixer', then enable alsamixer below and
# set the appropriate card and contol values.
# Run the command 'amixer scontrols' from the commandline to list the available controls for your mixer.
# See https://github.com/mopidy/mopidy-alsamixer for more details.
[alsamixer]
enabled = false
card = 1
control = Master

[stream]
enabled = true

[http]
hostname = 0.0.0.0
#Disable zeroconf
zeroconf = ""
static_dir = /opt/musicbox/webclient

[musicbox_webclient]
musicbox = true

[websettings]
musicbox = true
config_file = /boot/config/settings.ini

[mpd]
hostname = 0.0.0.0
#Disable zeroconf
zeroconf = ""

[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy

[logging]
config_file = /etc/mopidy/logging.conf
debug_file = /var/log/mopidy/mopidy-debug.log

[local]
enabled = true
library = sqlite
media_dir = /music
scan_follow_symlinks = true
excluded_file_extensions = .directory .html, .jpeg, .jpg, .log, .nfo, .png, .txt, .mkv, .avi, .divx, .qt, .htm, .zip, .rar, .gz, .pdf, .exe, .ini, .mid, .db, .m3u, .sfv, .midi

# WARNING: Do not add settings for [local-sqlite]
# because it breaks the startup script (won't read dashes in section names)

[file]
media_dirs = /music|Music
follow_symlinks = true

[m3u]
playlists_dir = /music/playlists
[subsonic]
enabled = false
ssl = no

My guess is that one of the values you’ve edited now contains some special characters? Or failing that the conf file has some how been corrupted but I can’t think say how that could have happened. I don’t see anything like a stray exclamation character as the OP had but since you have edited this file before posting I’m relying on that being correct. If it’s the wifi credentials then maybe try quoting the values.

Thank you for suggestions. Quoting didn’t help but deleting the file and making a new file with the same content helped.

But now I can’t login because it tells me I have bad username or password.

2018-05-27 11:56:47,352 - ERROR    Refreshing the auth token failed:     HTTPSConnectionPool(host='auth.mopidy.com', port=443): Max retries exceeded with url: /spotify/token (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],)",),))
    2018-05-27 11:56:47,361 - WARNING  Did not receive authentication token!
    2018-05-27 11:56:47,364 - WARNING  Could not initialize spotipy web api instance
    2018-05-27 11:56:52,208 - ERROR    Spotify login error: Bad username and/or password

Edit: The system clock is back to normal. Still doesn’t work.

I also checked that my username and password are alphanumerical

Edit2: I think I wrecked my whole installation: I tried to reinstall mopidy-spotify:

CardList.py  CardList.pyc  Reader.py  Reader.pyc  add_card.py  box.log  box.py  box.pyc  cardList.csv  cardList.csv.save  cardList.csv.save.1  config.py  deviceName.txt  gpio.log  gpio_control.py  shutdown  startup
root@MusicBox:~# tail -f /var/log/mopidy/mopidy.log
2018-05-27 11:56:47,352 - ERROR    Refreshing the auth token failed: HTTPSConnectionPool(host='auth.mopidy.com', port=443): Max retries exceeded with url: /spotify/token (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],)",),))
2018-05-27 11:56:47,361 - WARNING  Did not receive authentication token!
2018-05-27 11:56:47,364 - WARNING  Could not initialize spotipy web api instance
2018-05-27 11:56:52,208 - ERROR    Spotify login error: Bad username and/or password
2018-05-27 11:59:15,480 - ERROR    Refreshing the auth token failed: HTTPSConnectionPool(host='auth.mopidy.com', port=443): Max retries exceeded with url: /spotify/token (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],)",),))
2018-05-27 11:59:15,489 - WARNING  Did not receive authentication token!
2018-05-27 11:59:15,491 - WARNING  Could not initialize spotipy web api instance
2018-05-27 11:59:15,690 - ERROR    Spotify login error: Bad username and/or password
2018-10-21 19:42:05,286 - ERROR    Spotify login error: Bad username and/or password
2018-10-21 19:42:42,240 - WARNING  Element doesn't implement handling of this stream. Please file a bug.
^C
root@MusicBox:~# date
Sun Oct 21 19:49:11 BST 2018
root@MusicBox:~# service mopidy restart
[....] Restarting Mopidy music server: mopidy
. ok
root@MusicBox:~#
root@MusicBox:~# service mopidy stop
root@MusicBox:~# ps aux | grep mopidy
root      3017  0.0  0.2   2036  1224 pts/0    S+   19:53   0:00 grep mopidy
root@MusicBox:~# sudo apt-get purge mopidy-spotify
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mopidy-spotify
root@MusicBox:~# pip uninstall Mopidy-Spotify
Uninstalling Mopidy-Spotify-1.4.0:
  /usr/local/lib/python2.7/dist-packages/Mopidy_Spotify-1.4.0-py2.7.egg-info
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/__init__.py
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/__init__.pyc
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/backend.py
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/backend.pyc
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/container_manager.py
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/container_manager.pyc
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/ext.conf
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/images.py
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/images.pyc
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/library.py
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/library.pyc
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/playback.py
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/playback.pyc
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/playlist_manager.py
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/playlist_manager.pyc
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/playlists.py
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/playlists.pyc
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/session_manager.py
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/session_manager.pyc
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/spotify_appkey.key
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/translator.py
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/translator.pyc
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/utils.py
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/utils.pyc
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/web.py
  /usr/local/lib/python2.7/dist-packages/mopidy_spotify/web.pyc
Proceed (y/n)? y
  Successfully uninstalled Mopidy-Spotify-1.4.0
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
You are using pip version 9.0.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root@MusicBox:~# sudo apt-get install mopidy-spotify
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mopidy-spotify
root@MusicBox:~# sudo apt-get update
Get:1 http://mirrordirector.raspbian.org wheezy Release.gpg [473 B]
Hit http://www.lesbonscomptes.com unstable Release.gpg
Hit http://www.lesbonscomptes.com unstable Release
Get:2 http://archive.raspberrypi.org wheezy Release.gpg [488 B]
Get:3 http://mirrordirector.raspbian.org wheezy Release [14.4 kB]
Get:4 http://archive.raspberrypi.org wheezy Release [17.6 kB]
Hit http://www.lesbonscomptes.com unstable/main Sources
Get:5 http://archive.raspberrypi.org wheezy/main armhf Packages [145 kB]
Hit http://www.lesbonscomptes.com unstable/main armhf Packages
Ign http://www.lesbonscomptes.com unstable/main Translation-en
Get:6 http://mirrordirector.raspbian.org wheezy/main Sources [6097 kB]
Ign http://archive.raspberrypi.org wheezy/main Translation-en
Get:7 http://mirrordirector.raspbian.org wheezy/contrib Sources [53.2 kB]
Get:8 http://mirrordirector.raspbian.org wheezy/non-free Sources [98.4 kB]
Get:9 http://mirrordirector.raspbian.org wheezy/rpi Sources [588 B]
Get:10 http://mirrordirector.raspbian.org wheezy/main armhf Packages [7680 kB]
Get:11 http://mirrordirector.raspbian.org wheezy/contrib armhf Packages [35.0 kB]
Get:12 http://mirrordirector.raspbian.org wheezy/non-free armhf Packages [73.6 kB]
Get:13 http://mirrordirector.raspbian.org wheezy/rpi armhf Packages [592 B]
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en
Fetched 14.2 MB in 53s (267 kB/s)
Reading package lists... Done
root@MusicBox:~# sudo apt-get install mopidy-spotify
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mopidy-spotify
root@MusicBox:~# wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add -
OK
root@MusicBox:~# sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/stretch.list
root@MusicBox:~# sudo apt-get update
Get:1 http://apt.mopidy.com stretch Release.gpg [819 B]
Hit http://www.lesbonscomptes.com unstable Release.gpg
Get:2 http://apt.mopidy.com stretch Release [37.0 kB]
Hit http://mirrordirector.raspbian.org wheezy Release.gpg
Hit http://archive.raspberrypi.org wheezy Release.gpg
Hit http://www.lesbonscomptes.com unstable Release
Hit http://archive.raspberrypi.org wheezy Release
Hit http://mirrordirector.raspbian.org wheezy Release
Hit http://www.lesbonscomptes.com unstable/main Sources
Get:3 http://apt.mopidy.com stretch/main Sources [36.0 kB]
Hit http://www.lesbonscomptes.com unstable/main armhf Packages
Hit http://archive.raspberrypi.org wheezy/main armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/main Sources
Ign http://www.lesbonscomptes.com unstable/main Translation-en
Hit http://mirrordirector.raspbian.org wheezy/contrib Sources
Ign http://archive.raspberrypi.org wheezy/main Translation-en
Hit http://mirrordirector.raspbian.org wheezy/non-free Sources
Hit http://mirrordirector.raspbian.org wheezy/rpi Sources
Hit http://mirrordirector.raspbian.org wheezy/main armhf Packages
Get:4 http://apt.mopidy.com stretch/contrib Sources [7877 B]
Hit http://mirrordirector.raspbian.org wheezy/contrib armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/non-free armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/rpi armhf Packages
Get:5 http://apt.mopidy.com stretch/non-free Sources [3169 B]
Get:6 http://apt.mopidy.com stretch/main armhf Packages [20.3 kB]
Get:7 http://apt.mopidy.com stretch/contrib armhf Packages [5391 B]
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en
Get:8 http://apt.mopidy.com stretch/non-free armhf Packages [1040 B]
Ign http://apt.mopidy.com stretch/contrib Translation-en
Ign http://apt.mopidy.com stretch/main Translation-en
Ign http://apt.mopidy.com stretch/non-free Translation-en
Fetched 112 kB in 22s (4963 B/s)
Reading package lists... Done
root@MusicBox:~# apt-cache search mopidy
mopidy-doc - music server with support for MPD/HTTP clients - documentation
mopidy-soundcloud - Mopidy extension for playing music from SoundCloud
mopidy-tunein - Mopidy extension for playing music from TuneIn
mopidy-local-sqlite - Mopidy extension for keeping your local library in SQLite
mopidy - music server with support for MPD/HTTP clients
mopidy-podcast - Mopidy extension for searching and browsing podcasts
mopidy-dleyna - Mopidy extension for playing music from Digital Media Servers
mopidy-dirble - Mopidy extension for browsing Dirble's radio station directory
mopidy-internetarchive - Mopidy extension for playing music from the Internet Archive
mopidy-beets - Mopidy extension for playing music from Beets' web plugin
mopidy-alsamixer - Mopidy extension for extension for ALSA volume control
mopidy-somafm - Mopidy extension for playing music from SomaFM
mopidy-podcast-itunes - Mopidy extension for searching and browsing iTunes podcasts
mopidy-scrobbler - Mopidy extension for scrobbling music to Last.fm
mopidy-youtube - Mopidy extension for playing music from YouTube
mopidy-mpris - Mopidy extension for controlling playback through MPRIS
mopidy-spotify - Mopidy extension for playing music from Spotify
mopidy-spotify-tunigo - Mopidy extension for providing the browse feature of Spotify
mpd-watchdog - Music player daemon (MPD/Mopidy) watchdog
root@MusicBox:~# sudo apt-get install mopidy-spotify
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 mopidy-spotify : Depends: mopidy (>= 2.0) but it is not going to be installed
                  Depends: python-spotify (>= 2.0.5) but it is not going to be installed
                  Depends: python:any (< 2.8) but it is not installable
                  Depends: python:any (>= 2.7.5-5~) but it is not installable
E: Unable to correct problems, you have held broken packages.
root@MusicBox:~# pip install Mopidy-Spotify
Collecting Mopidy-Spotify
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/7c/67/e5bfc70a3698784eb98609dce6013e7f1ebf5f43b004053a7bffa389a017/Mopidy_Spotify-3.1.0-py2.py3-none-any.whl
Requirement already satisfied: requests>=2.0 in /usr/local/lib/python2.7/dist-packages (from Mopidy-Spotify)
Collecting Mopidy>=2.0 (from Mopidy-Spotify)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/dc/9e/c3651ef6b527ecb4a567efa542a12a39692914228d8ed6939d2fd86dcb29/Mopidy-2.2.1-py2.py3-none-any.whl (215kB)
    100% |################################| 225kB 243kB/s
Collecting pyspotify>=2.0.5 (from Mopidy-Spotify)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/5b/ce/7a6520ea348023762d5b138e85809198626c758ee8053bfc534438ad8bad/pyspotify-2.0.5.tar.gz (152kB)
    100% |################################| 153kB 329kB/s
Requirement already satisfied: Pykka>=1.1 in /usr/local/lib/python2.7/dist-packages (from Mopidy-Spotify)
Requirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages (from Mopidy-Spotify)
Requirement already satisfied: idna<2.7,>=2.5 in /usr/local/lib/python2.7/dist-packages (from requests>=2.0->Mopidy-Spotify)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/local/lib/python2.7/dist-packages (from requests>=2.0->Mopidy-Spotify)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python2.7/dist-packages (from requests>=2.0->Mopidy-Spotify)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python2.7/dist-packages (from requests>=2.0->Mopidy-Spotify)
Collecting tornado<5,>=4.4 (from Mopidy>=2.0->Mopidy-Spotify)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/e3/7b/e29ab3d51c8df66922fea216e2bddfcb6430fb29620e5165b16a216e0d3c/tornado-4.5.3.tar.gz (484kB)
    100% |################################| 491kB 134kB/s
Requirement already satisfied: cffi>=1.0.0 in /usr/local/lib/python2.7/dist-packages (from pyspotify>=2.0.5->Mopidy-Spotify)
Requirement already satisfied: backports.ssl_match_hostname in /usr/local/lib/python2.7/dist-packages (from tornado<5,>=4.4->Mopidy>=2.0->Mopidy-Spotify)
Collecting singledispatch (from tornado<5,>=4.4->Mopidy>=2.0->Mopidy-Spotify)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/c5/10/369f50bcd4621b263927b0a1519987a04383d4a98fb10438042ad410cf88/singledispatch-3.4.0.3-py2.py3-none-any.whl
Requirement already satisfied: backports_abc>=0.4 in /usr/local/lib/python2.7/dist-packages (from tornado<5,>=4.4->Mopidy>=2.0->Mopidy-Spotify)
Requirement already satisfied: pycparser in /usr/local/lib/python2.7/dist-packages (from cffi>=1.0.0->pyspotify>=2.0.5->Mopidy-Spotify)
Requirement already satisfied: six in /usr/local/lib/python2.7/dist-packages (from singledispatch->tornado<5,>=4.4->Mopidy>=2.0->Mopidy-Spotify)
Installing collected packages: singledispatch, tornado, Mopidy, pyspotify, Mopidy-Spotify
  Found existing installation: tornado 4.2.1
    Uninstalling tornado-4.2.1:
      Successfully uninstalled tornado-4.2.1
  Running setup.py install for tornado ... done
  Found existing installation: Mopidy 1.1.2
    Uninstalling Mopidy-1.1.2:
      Successfully uninstalled Mopidy-1.1.2
  Found existing installation: pyspotify 1.11
    Uninstalling pyspotify-1.11:
      Successfully uninstalled pyspotify-1.11
  Running setup.py install for pyspotify ... done
Successfully installed Mopidy-2.2.1 Mopidy-Spotify-3.1.0 pyspotify-2.0.5 singledispatch-3.4.0.3 tornado-4.5.3
You are using pip version 9.0.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root@MusicBox:~# tail -f /var/log/mopidy/mopidy.log
2018-05-27 11:56:47,364 - WARNING  Could not initialize spotipy web api instance
2018-05-27 11:56:52,208 - ERROR    Spotify login error: Bad username and/or password
2018-05-27 11:59:15,480 - ERROR    Refreshing the auth token failed: HTTPSConnectionPool(host='auth.mopidy.com', port=443): Max retries exceeded with url: /spotify/token (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],)",),))
2018-05-27 11:59:15,489 - WARNING  Did not receive authentication token!
2018-05-27 11:59:15,491 - WARNING  Could not initialize spotipy web api instance
2018-05-27 11:59:15,690 - ERROR    Spotify login error: Bad username and/or password
2018-10-21 19:42:05,286 - ERROR    Spotify login error: Bad username and/or password
2018-10-21 19:42:42,240 - WARNING  Element doesn't implement handling of this stream. Please file a bug.
2018-10-21 19:50:13,242 - ERROR    Spotify login error: Bad username and/or password
2018-10-21 19:54:37,143 - ERROR    Spotify login error: Bad username and/or password
^C
root@MusicBox:~# service mopidy restart
[ ok ] Restarting Mopidy music server: mopidy.
root@MusicBox:~# tail -f /var/log/mopidy/mopidy.log
2018-05-27 11:56:47,364 - WARNING  Could not initialize spotipy web api instance
2018-05-27 11:56:52,208 - ERROR    Spotify login error: Bad username and/or password
2018-05-27 11:59:15,480 - ERROR    Refreshing the auth token failed: HTTPSConnectionPool(host='auth.mopidy.com', port=443): Max retries exceeded with url: /spotify/token (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],)",),))
2018-05-27 11:59:15,489 - WARNING  Did not receive authentication token!
2018-05-27 11:59:15,491 - WARNING  Could not initialize spotipy web api instance
2018-05-27 11:59:15,690 - ERROR    Spotify login error: Bad username and/or password
2018-10-21 19:42:05,286 - ERROR    Spotify login error: Bad username and/or password
2018-10-21 19:42:42,240 - WARNING  Element doesn't implement handling of this stream. Please file a bug.
2018-10-21 19:50:13,242 - ERROR    Spotify login error: Bad username and/or password
2018-10-21 19:54:37,143 - ERROR    Spotify login error: Bad username and/or password
^C
root@MusicBox:~# ps aux | grep py
nobody    2052  0.0  0.2   2036  1416 ?        Ss   19:40   0:00 /usr/sbin/thd --daemon --triggers /etc/triggerhappy/triggers.d/ --socket /var/run/thd.socket --pidfile /var/run/thd.pid --user nobody /dev/input/event0
root      2864  0.0  1.5  25904  7736 ?        Sl   19:41   0:01 python -u /kartenaenderung/gpio_control.py
root      2887  0.0  1.7  10480  8640 ?        S    19:42   0:00 python -u /kartenaenderung/box.py
root      3258  0.0  0.2   2036  1260 pts/0    S+   20:04   0:00 grep py
root@MusicBox:~# ps aux | grep mopidy
root      3260  0.0  0.2   2036  1152 pts/0    S+   20:05   0:00 grep mopidy
root@MusicBox:~# service mopidy start
root@MusicBox:~# ps aux | grep mopidy
root      3277  0.0  0.2   2036  1264 pts/0    S+   20:05   0:00 grep mopidy
root@MusicBox:~# sudo reboot

Broadcast message from root@MusicBox (pts/0) (Sun Oct 21 20:05:20 2018):

The system is going down for reboot NOW!
root@MusicBox:~#
login as: root
root@192.168.2.106's password:

 ______ _    _______            _       ______
(_____ (_)  (_______)          (_)     (____  \
 _____) )    _  _  _ _   _  ___ _  ____ ____)  ) ___ _   _
|  ____/ |  | ||_|| | | | |/___) |/ ___)  __  ( / _ ( \ / )
| |    | |  | |   | | |_| |___ | ( (___| |__)  ) |_| ) X (
|_|    |_|  |_|   |_|____/(___/|_|\____)______/ \___(_/ \_)

Welcome!

root@MusicBox:~# ls
CardList.py  CardList.pyc  Reader.py  Reader.pyc  add_card.py  box.log  box.py  box.pyc  cardList.csv  cardList.csv.save  cardList.csv.save.1  config.py  deviceName.txt  gpio.log  gpio_control.py  shutdown  startup
root@MusicBox:~# cat /var/log/musicbox_startup.log
************************
Initializing MusicBox...
************************
Setting sound configuration...
Probing sound devices:
* Found internal device: card0
* Found internal device: card0
* Found unknown device 'sndrpihifiberrydac' on card1
Probing sound devices:
* Found internal device: card0
* Found internal device: card0
* Found i2s device: card1
Selected card=1  (i2s=1  output=hifiberry-dac  usb=1  intc=0)
Using audio card1 (hifiberry-dac)
MusicBox name is MusicBox
ifup: interface wlan0 already configured
Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces ... (warning).
Reconfiguring network interfaces...Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/b8:27:eb:cc:5e:19
Sending on   LPF/wlan0/b8:27:eb:cc:5e:19
Sending on   Socket/fallback
DHCPRELEASE on wlan0 to 192.168.2.1 port 67
Reloading /etc/samba/smb.conf: smbd only.
done.
Stopping Samba daemons: nmbd smbd.
Starting Samba daemons: nmbd smbd.
Waiting for network (1 of 4)...

Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces ... (warning).
Reconfiguring network interfaces...done.
Starting Dropbear SSH server: dropbear.
Starting daemon monitor: monit.
Scanning music-files, please wait...
Traceback (most recent call last):
  File "/usr/local/bin/mopidy", line 7, in <module>
    from mopidy.__main__ import main
  File "/usr/local/lib/python2.7/dist-packages/mopidy/__main__.py", line 10, in <module>
    from mopidy import commands, config as config_lib, ext
  File "/usr/local/lib/python2.7/dist-packages/mopidy/commands.py", line 14, in <module>
    from mopidy.audio import Audio
  File "/usr/local/lib/python2.7/dist-packages/mopidy/audio/__init__.py", line 4, in <module>
    from .actor import Audio
  File "/usr/local/lib/python2.7/dist-packages/mopidy/audio/actor.py", line 10, in <module>
    from mopidy.audio import tags as tags_lib, utils
  File "/usr/local/lib/python2.7/dist-packages/mopidy/audio/tags.py", line 10, in <module>
    from mopidy.internal.gi import GLib, Gst
  File "/usr/local/lib/python2.7/dist-packages/mopidy/internal/gi.py", line 9, in <module>
    gi.require_version('Gst', '1.0')
  File "/usr/lib/python2.7/dist-packages/gi/__init__.py", line 73, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gst not available
***********************************************************************************
My IP address is 192.168.2.106
Connect to me in your browser at http://MusicBox.local or http://192.168.2.106
***********************************************************************************
starting python scripts
started gpio_control.py
started box.py
root@MusicBox:~#

Can I do anything to salvage this Situation? The Musicbox is about 400km away from my position and I’m doing everything remotely