Stuck inside network settings

I’ve been having this problem since forever really, its just that it really bothers me lately and i have to solve it.
The problem is that when i reboot the pi2 99% of the time it wont autoreconnect to the wifi router.I have to manually go to network settings and connect, retyping my password 3-4 times till it gets it. After that i cant Exit the wifi settings screen…I press Exit and nothing happens. I have to reboot the pi and hope that it will autoconnect again…otherwise, the same thing…i have to do it manually and i wont be able to exit the settings…
So my solution ? Never reboot the pi, and have it ON 24/7.

Is there a way i can fix this ?

Btw when i go into Network settings i see ALL the Layers on top of each other (wired, wireless, tethering, mysql) until i ‘move down’ in the menu.
Imagine having each settings tab on a layer in photoshop, one under the other…thats how i see it.

Because i cant go back to the menu and create a log file, are there any commands i can do to give you guys the logs manually ?

Figured it out how to stop/start kodi. here is the log

I guess here is the problem ?

18:29:21 1512.674805 T:1725490208   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
Error Type: <type 'exceptions.TypeError'>
Error Contents: argument of type 'NoneType' is not iterable
Traceback (most recent call last):
  File "/usr/share/kodi/addons/script.module.osmcsetting.networking/resources/lib/", line 427, in onAction
  File "/usr/share/kodi/addons/script.module.osmcsetting.networking/resources/lib/", line 409, in shutdown_process
    write = self.write_advancedsettings(self.advs_dict)
  File "/usr/share/kodi/addons/script.module.osmcsetting.networking/resources/lib/", line 797, in write_advancedsettings
    dictionary_valid = self.validate_advset_dict(dictionary)
  File "/usr/share/kodi/addons/script.module.osmcsetting.networking/resources/lib/", line 778, in validate_advset_dict
    if 'videodatabase' in main:
TypeError: argument of type 'NoneType' is not iterable
-->End of Python script error report<--


root@osmc:~# cat /etc/*-release
PRETTY_NAME="Open Source Media Center"
VERSION="September 2015"


Your installation is quite old and needs updating. Use the MyOSMC update module from GUI or run
sudo apt-get update && sudo apt-get dist-upgrade

Updating always left me with a broken osmc. Will the update fix the wifi problem for sure ? I mean is it worth the chance ?
Is this bug that i am having something that you’ve encountered in previous versions ? Thats why you suggest i upgrade?


Ps: I remember having the above problem with the 1st osmc release as well (after the beta).

My best guess would be that you restored your .kodi directory from a backup or copied it from somewhere. The owner/permissions are probably wrong. Try something like sudo chown -r osmc:osmc /home/osmc/.kodi sudo chmod -r 0755 /home/osmc/.kodi

I did have problems with updates when i did that (restore from older .kodi versions) so this time my setup was ‘from scratch’. Everything was reinstalled and nothing was transferred back to the pi from backups.
God i wish there was any easy way for it to autoconnect or keep trying…I just did the chown changes for just in case, and then rebooted and i wont autoconnect again to the router…I gotta go do it manually again…which means tomorrow morning. :frowning:
i’ll try the update tomorrow and report back.

ps: Is there a command line i can do for the kodi to try connect to the router again ? Like the gui does.
Maybe i can run a script that pings my router every x minutes and if it cant find it to run the same command the gui does to reconnect.

Well it went online eventually, and i managed to do the GUI update. I can go into the network settings now without getting stuck there…But i’ll have to reproduce the bug tomorrow and see if it only does it when the wifi is down.
Also i tried the console update after and got this message in the end…Should i remove them ?

Calculating upgrade... The following packages were automatically installed and are no longer required:
  libflac8 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 rbp2-image-4.1.5-1-osmc rbp2-image-4.2.1-1-osmc
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Thanks again

This indicates a hardware problem


The problem was gone after I updated. Today with the latest update it’s back again. I can’t exit the network settings screen.


What happened was i had my wireless dongle in RPI2 connected to one WLAN AP (without internet connection) overnight and in the morning changed the connection to another WLAN AP (with internet connection)…

The problem is i can’t exit networking settings…

See full debug logs:

Also reboot(s) doesnt help … the problem persists. Everytime i go to Networking i cant exit and same exception in the logs as seen in my previous post debug logs

What might be the problem ?

Same problem then. Here is also my logs:

Yes i see you have the same exception as i do… i never seen this before

It might be something inside Networking a situation which leads to dead end… i was playing with wireless network disconnection/connection stuff… everything worked ok until no exit

Do you have tethering enabled ?

@zxz The only way i found was to connect to the pi from my iphone and do : systemctl stop mediacenter and then systemctl start mediacenter so it keeps the connection and kodi is back again.

@DBMandrake I dont, neither Wired Internet

if you check my logs you’ll see:

17:21:37 133.383057 T:1646261280   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
Error Type: <type 'exceptions.AttributeError'>
Error Contents: 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
File "/usr/share/kodi/addons/script.module.osmcsetting.networking/resources/lib/", line 403, in onClick
File "/usr/share/kodi/addons/script.module.osmcsetting.networking/resources/lib/", line 417, in shutdown_process
if self.ASE.server_not_localhost(self.advs_dict):
File "/usr/share/kodi/addons/script.module.osmcsetting.networking/resources/lib/", line 64, in server_not_localhost
dbs = [ dictionary.get('advancedsettings',{}).get('musicdatabase',{}),
AttributeError: 'NoneType' object has no attribute 'get'
-->End of Python script error report<--
17:21:37 133.385620 T:1646261280   ERROR: Previous line repeats 1 times.

That happens when i press Exit in the GUI

Edit: Scratch that request for logs, I see them above now.

You have an empty /home/osmc/.kodi/userdata/advancedsettings.xml file.

Delete that and you should be fine.

I will add in a detection for empty files in the next update.

Thanks for the report.

Full logs were a few posts up:
And my adv settings file is empty

<?xml version="1.0" encoding="utf-8"?>

Yep, see edit. I saw the logs immediately after requesting them

I dont know if it matters much but the problem was gone in the previous update. I had late October’s version and then i updated to Novembers and after that i could exit fine…maybe you guys changed something in the…just mentioning so you can pinpoint the bug ? It came back with this latest update

Yep, thanks for that.

There was a change. Do you know if you had an empty advancedsettings.xml file previously?

yup, its always been empty

Any reason why it is there, do you know? I want to rule out us having created an empty advancedsettings.xml file somewhere in the code.