# Unable to load web Settings

**URL:** <https://discourse.mopidy.com/t/unable-to-load-web-settings/3597>\
**Category:** Pi MusicBox (archive)\
**Created:** [November 18, 2019, 2:30am UTC](https://discourse.mopidy.com/t/unable-to-load-web-settings/3597 "2019-11-18T02:30:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shanwa](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/shanwa/32/1348_2.png) [@shanwa](https://discourse.mopidy.com/u/shanwa)\
**Post date:** [November 18, 2019, 2:30am UTC](https://discourse.mopidy.com/t/unable-to-load-web-settings/3597/1 "2019-11-18T02:30:38Z")

</div>

Hi,

I’m hoping this is a simple solution as I can’t seem to figure it out. I’ve made some adjustments to the settings via cli and now the settings webpage no longer loads with an error. I’ve been using it for a little while now and I’ve modified the root password via cli so unsure why it’s showing the error as below:

> 2019-11-18 11:50:01,459 - ERROR Uncaught exception GET /settings/ (192.168.100.210)  
> HTTPServerRequest(protocol=‘http’, host=‘192.168.100.145’, method=‘GET’, uri=‘/settings/’, version=‘HTTP/1.1’, remote\_ip=‘192.168.100.210’, headers={‘Accept-Language’: ‘en-au’, ‘Accept-Encoding’: ‘gzip, deflate’, ‘Host’: ‘192.168.100.145’, ‘Accept’: ‘text/html,application/xhtml+xml,application/xml;q=0.9,_/_;q=0.8’, ‘User-Agent’: ‘Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Safari/605.1.15’, ‘Connection’: ‘keep-alive’, ‘Referer’: ‘[http://192.168.100.145/musicbox\_webclient/index.html](http://192.168.100.145/musicbox_webclient/index.html)’, ‘Upgrade-Insecure-Requests’: ‘1’})  
> Traceback (most recent call last):  
> File “/usr/local/lib/python2.7/dist-packages/tornado/web.py”, line 1467, in \_execute  
> result = method(\*self.path\_args, \*\*self.path\_kwargs)  
> File “/usr/local/lib/python2.7/dist-packages/mopidy\_websettings/ **init**.py”, line 92, in get  
> ‘change\_root\_password’: can\_change\_root\_password(iniconfig)  
> UnboundLocalError: local variable ‘iniconfig’ referenced before assignment  
> 2019-11-18 11:50:01,472 - ERROR 500 GET /settings/ (192.168.100.210) 546.95ms  
> 2019-11-18 11:50:10,322 - WARNING Element doesn’t implement handling of this stream. Please file a bug.

Here’s my /etc/mopidy/mopidy.conf file (removing wifi creds and links):

root@MusicBoxH:~# cat /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

# 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 = AU

# 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 , 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 = MusicBoxH

# Mount Windows Network Drive on boot (via samba/cifs)

# The address is exactly how Samba mount works: //servername/mountpoint/directory

# e.g.

# if the mount needs a username/password, also set it (leave empty for guest-access)

# Additional comma-separated mount options can also be specified.

# Don’t forget to let Mopidy/MusicBox scan the contents at first boot (see below)

mount\_address = “”

mount\_user = “”

mount\_password = “”

mount\_options = vers=1.0

# 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 |

# -----------

# 

[spotify]

# Supply your PREMIUM account credentials to enable Spotify

enabled = false

username = “”

password = “”

# ALSO supply your credentials obtained from

client\_id = “”

client\_secret = “”

# The bitrate, the quality of the music played by Spotify, can be set to 96, 160 (default) or 320

bitrate = 320

cache\_dir = “”

# ---------------

# | Spotify-Web |

# ---------------

# 

# Supply same client credentials as Spotify above

[spotify\_web]

enabled = false

client\_id = “”

client\_secret = “”

# -----------

# | Last.fm |

# -----------

# 

# Supply your credentials to scrobble tracks to Last.fm

[scrobbler]

enabled = false

username = “”

password = “”

# --------------

# | SoundCloud |

# --------------

# 

# Supply your auth\_token obtained from

[soundcloud]

enabled = false

auth\_token = “”

# ----------------

# | Google Music |

# ----------------

# 

# 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 |

# -----------

# 

# Play music from Youtube

# NOTE: Search is currently broken!

[youtube]

enabled = true

# ----------

# | Dirble |

# ----------

# 

# Play radio stations from Dirble

[dirble]

enabled = false

api\_key = 473279e3fa0e7010cbbbb40ecc31890d46e57a2e

countries = US, NL, DE, NO, SE

# ----------------

# | TuneIn Radio |

# ----------------

# 

# Play radio stations from TuneIn

[tunein]

enabled = true

# ------------------------

# | The Internet Archive |

# ------------------------

# 

# Listen to sounds and music from the Internet Archive

[internetarchive]

enabled = true

# -----------

# | Soma FM |

# -----------

# 

# Play radio stations from Soma FM

[somafm]

enabled = true

encoding = mp3

quality = fast

# -----------

# | Podcast |

# -----------

# 

# 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 |

# ---------------

# 

# Play music from all the AudioAddict network of sites (login optional)

[audioaddict]

enabled = true

quality = 40k

difm = true

radiotunes = true

rockradio = true

jazzradio = true

frescaradio = true

# ---------

# | Tidal |

# ---------

# 

# Supply your credentials to enable Tidal.

[tidal]

enabled = false

username = “”

password = “”

# Can be set to LOW, HIGH or LOSSLESS. LOSSLESS requires a Tidal HiFi Subscription

quality = HIGH

# ---------------------

# | MusicBox Settings |

# ---------------------

[musicbox]

# To secure your device, change the default password to something else.

# For security, the value below will be automatically cleared once the password is changed.

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 = false

# 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 = or local:track:MusicBox/Music%20File.mp3 (on the SD Card)

autoplay = anything goes

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 = false

# Spotify Connect support (using librespot) \*\* BETA\*\*

enable\_connect = false

# ------------------

# | 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, justboom\_dac, justboom\_digi,

# iqaudio\_dacplus, iqaudio\_digi\_wm8804\_audio, audioinjector-wm8731-audio, audioinjector-addons,

# allo-boss-dac, allo-piano-dac, allo-piano-dac-plus, allo\_digione

# If you don’t know what to put here then use websettings instead.

output = justboom\_dac

enable\_stream\_watchdog = false

scan\_always = true

# --------------------------------------------------------------------------

# | 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 = 3

# 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 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/MusicBox

scan\_follow\_symlinks = false

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/MusicBox|Music

/music/Xmas|Xmas

follow\_symlinks = false

[m3u]

playlists\_dir = /music/playlists

Any help truly appreciated!

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [November 18, 2019, 10:27am UTC](https://discourse.mopidy.com/t/unable-to-load-web-settings/3597/2 "2019-11-18T10:27:52Z")

</div>

It’s been a while but I think that’s a bug I fixed. Grab the latest development version with:

```auto
pip install -U --no-deps https://github.com/pimusicbox/mopidy-websettings/archive/develop.zip
```

---

<div class="post-metadata">

**Author:** ![shanwa](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/shanwa/32/1348_2.png) [@shanwa](https://discourse.mopidy.com/u/shanwa)\
**Post date:** [November 24, 2019, 11:28pm UTC](https://discourse.mopidy.com/t/unable-to-load-web-settings/3597/3 "2019-11-24T23:28:23Z")

</div>

Perfect, looks like it fixed my issues. It also looks like it didn’t like these lines in my config on separate lines, so adjusted as per below (line 338 in config file)

`media_dirs = /music/MusicBox|Music /music/Xmas|Xmas`

Thanks so much for your help!

---

<div class="post-metadata">

**Author:** ![jodal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/jodal/32/2651_2.png) [@jodal](https://discourse.mopidy.com/u/jodal)\
**Post date:** [February 19, 2026, 11:46am UTC](https://discourse.mopidy.com/t/unable-to-load-web-settings/3597/4 "2026-02-19T11:46:57Z")

</div>

Closed on February 19, 2026, 11:46am UTC


