Mopidy-Websettings error message

I’m trying to use the websettings option ( the page opens ok but come up with this error message at the top of the page -
“Could not load ini file! Parsing failed with several errors. First error at line 21.”

I don’t know how to “Make sure the config file is writable by the user” and wonder if this could be causing the error.

  • Discover what user and group your process runs as. The Debian packaged Mopidy service should be mopidy and audio respectively.
  • discover what file the process is trying to write. In this case it is controlled by the extension setting as the project readme should mention.
  • ensure either the user or group has write permission for the particular file. There is plenty of information online explaining how Linux permissions work and how they are represented.
  • try changing the permissions and see if that helps

But having said all that, it’s clearly saying there is a problem reading the settings file at a particular line. So I’d start there.

Thanks I have tried changing permissions, but wasn’t sure if I had done it correctly - although there is plenty of info when it doesn’t behave as you hope it’s difficult to tell if its the operator or the machine.

There is nothing in the docs regarding settings.ini, but I am guessing the one it’s having a problem with is
/usr/local/lib/python2.7/dist-packages/mopidy_websettings/settingsspec.ini - line 21 is blank.

enabled = "boolean(default=false)"
username = "string(default=’’)"
password = "string(default=’’)"
bitrate = “float(min=96, max=320, default=160)”

enabled = "boolean(default=false)"
client_id = "string(default=’’)"
client_secret = “string(default=’’)”

enabled = "boolean(default=false)"
all_access = "boolean(default=false)"
username = "string(default=’’)"
password = "string(default=’’)"
deviceid = “string(default=’’)”

enabled = “boolean(default=true)”

enabled = “boolean(default=true)”

enabled = “boolean(default=true)”

enabled = “boolean(default=true)”

I’ve been looking at the /usr/local/lib/python2.7/dist-packages/mopidy_websettings/settingsspec.ini file and the corresponding index.html files and they appear to contain more information than I am currently getting on the websettings page. I’ve tried emptying the browser cache and have tried 3 different browsers.

If I load “/file:///C:/Users/Steven/AppData/Local/Temp/scp32385/usr/local/lib/python2.7/dist-packages/mopidy_websettings/index.html” into the browser I get extra options rather than loading “

I’ve just tried the same on a different Pi Zero W and I get the same problem except the first error is at line 60.

The index.html file is a template. If you just open it you’ll see all sections but none of your config values will be present. That’s because you will not be running the server-side python code that outputs the correct sections (from the spec file) with the values taken from settings.ini (or wherever you’ve specified in the extension setting). The server-side python code is run when you view the web page served by mopidy. If one of the spec sections is not present in settings.ini I think that’s a problem. Or if the settings.ini file is incorrectly formatted and cannot be parsed.

When i said project readme I meant

Hi Kingosticks, thanks for your reply, having spent a lot of time trying to sort it out I’ve decided I don’t really need it anyway!! I was only trying to make it easier for a setup for my daughter.
I haven’t updated this post but spent a lot of yesterday going through it, I understand now about the index.html file, and a lot more about the whole websettings setup, however I cannot find a settings.ini and can’t see where it’s possible to specify it in the extension. As I mentioned before the only ini file I can find is settingspec.ini.

I’ve installed from pip a couple of times, been through the link numerous times and can’t see what I could have missed or misunderstood, (btw when going through apt, mopidy-websettings comes up as not found).

I’ve studied, amended the code and pared it right back but still get the same error.

I’ve applied to make all necessary files written to by anybody.

I’ve used the specsetting.ini file that is supplied with the setup files and assume it’s correctly parsed and formatted.

I’ve tried on 3 different pi’s, all with only jessie lite and mopidy on them, and not had success on any of them.

Thanks for your help.