4

I can't seem to get “Software & Updates” Application to appear after clicking on it. I don't know why. It's icon appears in the shortcut. What is the terminal command to activate this App?

I have tried this answer: “Software Updater” & “Software & Updates” not working, but it did not work.

$ uname -a
Linux Ubuntu 5.4.0-42-generic #46~18.04.1-Ubuntu SMP Fri Jul 10 07:21:24 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

$ gnome-shell --version GNOME Shell 3.28.4

$ software-properties-gtk ERROR:dbus.proxies:Introspect error on :1.228:/: 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 173, 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.228 was not provided by any .service files

I also have the same msgs as in Ubuntu 18.04 software-properties-gtk failing with org.freedesktop.DBus.Error.ServiceUnknown. I used Synaptic to reinstall the package python3-size as was mentioned in this answer but to no avail.

I had also tried purging and reinstalling software-properties-gtk as was mentioned here but to no avail.

Update1:

I wonder if setuptools.py ver 50.0 broke software-properties-gtk's connection? I know that the system had this upgraded yesterday from ver 42.0.2. I just found this GitHub issue "setuptools 50 breaks pip installation" which was raised 22 hours ago. I have uninstalled it but to no avail.

Update 2: Using journalctl -e cmd in the terminal, I found this error msg:

Oct 04 08:22:14 Prime dbus-daemon[1303]: [system] Activating service name='com.ubuntu.SoftwareProperties' requested by ':1.157' (uid=1000 pid=10808 comm="/usr/bin/python3 /usr/bin/soft
Oct 04 08:22:14 Prime com.ubuntu.SoftwareProperties[1303]: Unable to init server: Could not connect: Connection refused
Oct 04 08:22:14 Prime com.ubuntu.SoftwareProperties[1303]: Unable to init server: Could not connect: Connection refused
Oct 04 08:22:14 Prime dbus-daemon[1303]: [system] Successfully activated service 'com.ubuntu.SoftwareProperties'
Oct 04 08:22:14 Prime com.ubuntu.SoftwareProperties[1303]: Traceback (most recent call last):
Oct 04 08:22:14 Prime com.ubuntu.SoftwareProperties[1303]:   File "/usr/lib/software-properties/software-properties-dbus", line 68, in <module>
Oct 04 08:22:14 Prime com.ubuntu.SoftwareProperties[1303]:     server = SoftwarePropertiesDBus(bus, datadir=datadir)
Oct 04 08:22:14 Prime com.ubuntu.SoftwareProperties[1303]:   File "/usr/lib/python3/dist-packages/softwareproperties/dbus/SoftwarePropertiesDBus.py", line 66, in __init__
Oct 04 08:22:14 Prime com.ubuntu.SoftwareProperties[1303]:     self._livepatch_service = LivepatchService()
Oct 04 08:22:14 Prime com.ubuntu.SoftwareProperties[1303]:   File "/usr/lib/python3/dist-packages/softwareproperties/LivepatchService.py", line 93, in __init__
Oct 04 08:22:14 Prime com.ubuntu.SoftwareProperties[1303]:     self._session = requests_unixsocket.Session()
Oct 04 08:22:14 Prime com.ubuntu.SoftwareProperties[1303]: NameError: name 'requests_unixsocket' is not defined

Also, the python package 'requests_unixsocket' is installed in the system(see below). Hence I don't understand the error msg NameError: name 'requests_unixsocket' is not defined:

$ pip list | grep requests
requests                2.24.0
requests-unixsocket     0.1.5
WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
$ pip3 list | grep requests
requests                2.24.0
requests-unixsocket     0.1.5
WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
$ pip3 list --user | grep requests
requests            2.24.0
WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.

I have tried to import requests_unixsocket explicitly. It works. See below.

Python 3.6.9 (default, Jul 17 2020, 12:50:27) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license()" for more information.
>>> import requests_unixsocket
>>> a = requests_unixsocket.Session()
>>> a
<requests_unixsocket.Session object at 0x7fb103952470>

I don't understand why I can import the package but /usr/lib/python3/dist-packages/softwareproperties/LivepatchService.py can't see it. It does exist:

$ ls /usr/lib/python3/dist-packages/ | grep request
requests_unixsocket
requests_unixsocket-0.1.5.egg-info
Sun Bear
  • 2,302
  • 1
    Provide information on the desktop you use. Terminal command is software-properties-gtk – vanadium Aug 31 '20 at 18:23
  • @vanadium I had updated my question with the info you ad asked. – Sun Bear Aug 31 '20 at 20:02
  • @vanadium I found a similar question on my issue here. The 2 answers posted there could not solve my issue. – Sun Bear Oct 04 '20 at 00:40
  • Did you do something to your system's python installation? – Organic Marble Oct 04 '20 at 01:36
  • @OrganicMarble The closest activity I can recall was upgrading pip3 packages. Specifically, I mentioned this in Update1. If there is an issue with my system's Python installation, is there any way to fix it? Or is the brokeness irreparable and I have to reinstall Ubuntu 18.04? – Sun Bear Oct 04 '20 at 01:50

2 Answers2

6

I am on Ubuntu 20.04 and I experienced this problem. I tried the posts that recommended reinstalling python3-six and python3-certifi, but those didn't work for me. However, software-properties-gtk did start working again for me after I reinstalled python3-requests and python3-idna. So, to sum up the commands I ran:

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

and I was back in business.

  • Worked after correcting the typo in your command first line. It should be sudo apt install --reinstall python3-six python3-certifi python3-requests python3-idna. I have made the edit. Pls accept it. :) – Sun Bear May 13 '21 at 21:57
  • I experienced this problem on Ubuntu 20.04 too. I reinstalled all python3-six, python3-certifi, python3-requests, python3-idna, python3-chardet, python3-urllib3 and software-properties-gtk but didn't work for me. Finally I tried software-properties-qt and worked for me (sudo apt install software-properties-qt). In appearance and performance it is almost like software-properties-gtk. – Amir Dadkhah May 25 '21 at 14:09
  • Thanks, worked for me too! (ubuntu 20.04) – ForeverLearning May 09 '22 at 18:30
  • None of these solutions worked for me. What worked, amazingly, was directly modifying the affected Python code, saving it, testing it (which worked), and then undoing the changes, after which software-properties-gtk still worked. Very strange. See https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1830914/comments/14 – Martin Spacek Dec 29 '22 at 13:14
2

Same problem on Ubuntu 20.10... I had a look to dbus messages:

sudo systemctl status dbus.service

and saw this line:

.../... com.ubuntu.SoftwareProperties[8310]: ModuleNotFoundError: No module named 'chardet'

So I reinstalled chardet:

sudo apt install --reinstall python3-chardet

and software-properties-gtk is back.

The log shows:

dbus-daemon[1130]: [system] Successfully activated service 'com.ubuntu.SoftwareProperties'

Hope it helps.