6

Problem:

tim@ubuntu:~$ software-properties-gtk 
ERROR:dbus.proxies:Introspect error on :1.103:/: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
Traceback (most recent call last):
  File "/usr/bin/software-properties-gtk", line 100, in <module>
    app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 172, in __init__
    self.backend.Reload();
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.103 was not provided by any .service files
tim@ubuntu:~$ 

The "name" value increments each time I try.

I have tried purging and reinstalling dbus e.g.

 sudo aptitude reinstall apt apt-utils aptdaemon aptdaemon-data update-manager update-manager-core dbus

But to no avail.

This is a Xubuntu 18.04 install which until now has given no problems.

more info:

journalctl -e

gives the following output:

06 17:41:56 ubuntu earlyoom[810]: mem avail:  6439 of  7950 MiB (80 %), swap free: 3975 of 3975 MiB (100 %)
Sep 06 17:41:57 ubuntu dbus-daemon[723]: [system] Activating service name='com.ubuntu.SoftwareProperties' requested by ':1.97' (uid=1000 pid=5778 comm="/usr/bin/python3 /usr/bi
Sep 06 17:41:57 ubuntu com.ubuntu.SoftwareProperties[723]: Unable to init server: Could not connect: Connection refused
Sep 06 17:41:57 ubuntu com.ubuntu.SoftwareProperties[723]: Unable to init server: Could not connect: Connection refused
Sep 06 17:41:57 ubuntu dbus-daemon[723]: [system] Successfully activated service 'com.ubuntu.SoftwareProperties'
Sep 06 17:41:57 ubuntu com.ubuntu.SoftwareProperties[723]: Traceback (most recent call last):
Sep 06 17:41:57 ubuntu com.ubuntu.SoftwareProperties[723]:   File "/usr/lib/software-properties/software-properties-dbus", line 68, in <module>
Sep 06 17:41:57 ubuntu com.ubuntu.SoftwareProperties[723]:     server = SoftwarePropertiesDBus(bus, datadir=datadir)
Sep 06 17:41:57 ubuntu com.ubuntu.SoftwareProperties[723]:   File "/usr/lib/python3/dist-packages/softwareproperties/dbus/SoftwarePropertiesDBus.py", line 66, in __init__
Sep 06 17:41:57 ubuntu com.ubuntu.SoftwareProperties[723]:     self._livepatch_service = LivepatchService()
Sep 06 17:41:57 ubuntu com.ubuntu.SoftwareProperties[723]:   File "/usr/lib/python3/dist-packages/softwareproperties/LivepatchService.py", line 93, in __init__
Sep 06 17:41:57 ubuntu com.ubuntu.SoftwareProperties[723]:     self._session = requests_unixsocket.Session()
Sep 06 17:41:57 ubuntu com.ubuntu.SoftwareProperties[723]: NameError: name 'requests_unixsocket' is not defined
Kevin Bowen
  • 19,615
  • 55
  • 79
  • 83
Tim Richardson
  • 2,294
  • 3
  • 25
  • 43

5 Answers5

3

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.

Tim Richardson
  • 2,294
  • 3
  • 25
  • 43
1

I had the same issue. This did the trick:

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

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.

0

Similar to the other answers, I had a bunch of python modules whose versions I'd updated using pip (for some scripts I was testing), which then broke software-properties-gtk, but on Ubuntu 20.04 LTS.

I removed those versions and reinstalled them via apt.

sudo pip uninstall six certifi urllib3 dateutil requests

sudo apt install --reinstall
python3-six
python3-certifi
python3-urllib3
python3-dateutil
python3-requests
software-properties-gtk

I now use virtual python environments (via Anaconda) so this doesn't happen again.

Reference for software-properties-gtk dependencies: https://reposcope.com/package/software-properties-gtk/dependencies

Jak
  • 101
  • 3
-1
sudo apt purge software-properties-gtk
sudo apt autoremove
sudo apt update
sudo apt install software-properties-gtk
sudo software-properties-gtk

I had same problem and i reinstall software-properties-gtk and my problem fixed

Rambod
  • 99