[Bug 1830914] Re: software-properties-gtk does not run at all!

dexter 1830914 at bugs.launchpad.net
Mon Jun 24 13:14:42 UTC 2019


I found that if I move a bit the "import requests_unixsocket" line (in file LivepatchService.py), then the software-properties-gtk call *works*.
Please somebody either propagate this solution (if it is a true solution), or tell me how to propagate.
(I do not know shat is exactly happening. Whether the try-clause partly succeeds, then rolls back?..)


$ sudo -s

# cd /usr/lib/python3/dist-packages/softwareproperties

# diff -u4 LivepatchService.py.ORI LivepatchService.py.MY
--- LivepatchService.py.ORI	2019-06-24 14:46:07.000000000 +0200
+++ LivepatchService.py.MY	2019-06-24 14:54:31.000000000 +0200
@@ -23,13 +23,12 @@
 import logging
 
 import gi
 from gi.repository import Gio, GLib, GObject
+import requests_unixsocket
 
 try:
     import dateutil.parser
-    import requests_unixsocket
-
     gi.require_version('Snapd', '1')
     from gi.repository import Snapd
 except(ImportError, ValueError):
     pass


# cp LivepatchService.py.MY LivepatchService.py


$ software-properties-gtk

{OK, works! The dialog is popping up.}

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to software-properties in Ubuntu.
https://bugs.launchpad.net/bugs/1830914

Title:
  software-properties-gtk does not run at all!

Status in software-properties package in Ubuntu:
  New

Bug description:
  software-properties-gtk does not even start!

  
  $ software-properties-gtk --debug

  ENABLED COMPS: {'universe', 'main'}
  INTERNET COMPS: {'universe', 'main'}
  MAIN SOURCES
   URI: http://archive.ubuntu.com/ubuntu
   Comps: ['main']
   Enabled: True
   Valid: True
   MatchURI: archive.ubuntu.com/ubuntu
   BaseURI: http://archive.ubuntu.com/ubuntu

  
   URI: http://archive.ubuntu.com/ubuntu
   Comps: ['universe']
   Enabled: True
   Valid: True
   MatchURI: archive.ubuntu.com/ubuntu
   BaseURI: http://archive.ubuntu.com/ubuntu

  
  CHILD SOURCES
   URI: http://archive.ubuntu.com/ubuntu
   Comps: ['main']
   Enabled: True
   Valid: True
   MatchURI: archive.ubuntu.com/ubuntu
   BaseURI: None

  
   URI: http://archive.ubuntu.com/ubuntu
   Comps: ['universe']
   Enabled: True
   Valid: True
   MatchURI: archive.ubuntu.com/ubuntu
   BaseURI: None

  
   URI: http://archive.ubuntu.com/ubuntu
   Comps: ['main']
   Enabled: True
   Valid: True
   MatchURI: archive.ubuntu.com/ubuntu|security.ubuntu.com
   BaseURI: http://security.ubuntu.com/ubuntu/

  
   URI: http://archive.ubuntu.com/ubuntu
   Comps: ['universe']
   Enabled: True
   Valid: True
   MatchURI: archive.ubuntu.com/ubuntu|security.ubuntu.com
   BaseURI: http://security.ubuntu.com/ubuntu/

  
   URI: http://archive.ubuntu.com/ubuntu
   Comps: ['universe', 'main']
   Enabled: True
   Valid: True
   MatchURI: archive.ubuntu.com/ubuntu
   BaseURI: None

  
  CDROM SOURCES
  SOURCE CODE SOURCES
  DISABLED SOURCES
  ISV
  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 200, in __init__
      self.init_livepatch()
    File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 1482, in init_livepatch
      self.livepatch_page = LivepatchPage(self)
    File "/usr/lib/python3/dist-packages/softwareproperties/gtk/LivepatchPage.py", line 51, in __init__
      self._lps = LivepatchService()
    File "/usr/lib/python3/dist-packages/softwareproperties/LivepatchService.py", line 93, in __init__
      self._session = requests_unixsocket.Session()
  NameError: name 'requests_unixsocket' is not defined

  {Exited with code 1.}

  
  $ lsb_release -a
  No LSB modules are available.
  Distributor ID:	Ubuntu
  Description:	Ubuntu 19.04
  Release:	19.04
  Codename:	disco

  
  $ dpkg-query -l software-properties-gtk python3-requests-unixsocket

  Desired=Unknown/Install/Remove/Purge/Hold
  | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
  |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
  ||/ Name                        Version      Architecture Description
  +++-===========================-============-============-===============================================================
  ii  python3-requests-unixsocket 0.1.5-3      all          Use requests to talk HTTP via a UNIX domain socket - Python 3.x
  ii  software-properties-gtk     0.97.11      all          manage the repositories that you install software from (gtk)

  
  $ sudo apt-get update
  {Works.}

  $ sudo apt-get dist-upgrade
  {Works.}

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1830914/+subscriptions



More information about the foundations-bugs mailing list