Ubuntu 18.04 software-properties-gtk failing with org.freedesktop.DBus.Error.ServiceUnknown

It turns out that import requests_unixsocket was failing in /usr/lib/python3/dist-packages/softwareproperties/LivepatchService.py because

 try:
     import dateutil.parser
     import requests_unixsocket

     gi.require_version('Snapd', '1')
     from gi.repository import Snapd
 except(ImportError, ValueError):
     pass

and it was dateutil.parser not importing with an error that module six was not present. The package python3-six was installed (so my package manager said). when I reinstalled this package, software-properties-gtk worked again.


I had the same issue. This did the trick:

sudo apt-get update && sudo apt-get install --reinstall python3-six python3-certifi

For me it worked by reinstalling python3-urllib3:

sudo apt install --reinstall python3-urllib3

Also I suggest to update python3-six, python3-certifi and python3-requests.