Results 1 to 9 of 9

Thread: Sofware Updater broken

  1. #1
    Join Date
    Sep 2013
    Beans
    36

    Sofware Updater broken

    Hello everybody. I'm on Ubuntu 16.04 LTS 64-bit.
    My problem is the following:


    • When I launch "Software Updater" I get:

    Code:
    An unhandlable error occurred
    There seems to be a programming error in aptdaemon, the software that allows you to install/remove software and to perform other package management related tasks.
    • This is the output of some commands I've issued:

    Code:
    me@PC:~$ sudo apt-get clean
    me@PC:~$ sudo apt-get autoremove
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    me@PC:~$ sudo apt-get install
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    • When I type:

    Code:
    sudo mv /var/lib/apt/lists /var/lib/apt/lists_old
    And then I launch "Software Updater" again I get:
    Code:
    Software Updater
    Checking for updates...
    Waiting for other software managers to quit
    But of course there's no other software manager to wait for... so I've reverted the mv.

    Can anybody please help me?
    Thank you in advance.
    Last edited by slickymaster; December 7th, 2017 at 02:00 PM. Reason: Swapped quote for code tags

  2. #2
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    4,520

    Re: Sofware Updater broken

    Does the "Unhandlable Error" message include anything else?
    Usually it includes the python error traceback.

    How long has the current system been installed?

    Have you run "sudo apt update"?

  3. #3
    Join Date
    Sep 2013
    Beans
    36

    Re: Sofware Updater broken

    Quote Originally Posted by ian-weisser View Post
    Does the "Unhandlable Error" message include anything else?
    Usually it includes the python error traceback.
    Nothing else. Basically as soon as the "Update Manager" is "Loading software list" I see that error message with three buttons:
    • "Settings" (that does nothing other than displaying the message "The software on this computer is up to date." without checking for updates).
    • "Try again" (that restart the check and repeats the error message).
    • "OK" (that has the same effect as "Settings").


    Quote Originally Posted by ian-weisser View Post
    How long has the current system been installed?
    Years, and it always worked.
    Quote Originally Posted by ian-weisser View Post
    Have you run "sudo apt update"?
    Yes, the command line seems to work well as far as I can see. I get:
    Code:
    sudo apt update
    Hit:1 http://archive.canonical.com/ubuntu xenial InRelease                     
    Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease                        
    Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]       
    Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]     
    Get:5 http://archive.ubuntu.com/ubuntu xenial-security InRelease [102 kB]      
    Hit:6 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu xenial InRelease         
    Fetched 306 kB in 35s (8.676 B/s)
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    All packages are up to date.
    I should add that if I launch from the "System Settings" "Software and Updates" nothing happens...
    Last edited by slickymaster; December 7th, 2017 at 02:01 PM. Reason: Swapped quote for code tags

  4. #4
    Join Date
    Nov 2012
    Location
    Halloween Town
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Sofware Updater broken

    @flix3:

    Please use code tags, instead of quote tags, when posting output. Output posted as plain text loses its formatting and parts of it sometimes turn into smileys making it difficult to read and understand.

  5. #5
    Join Date
    Sep 2013
    Beans
    36

    Re: Sofware Updater broken

    @slickymaster:

    Ok.
    Last edited by flix3; December 7th, 2017 at 02:09 PM.

  6. #6
    Join Date
    Sep 2013
    Beans
    36

    Re: Sofware Updater broken

    Not sure if this is related or not. Basically if this links is true: https://askubuntu.com/questions/8122...w-to-remove-it, the "Software And Updates" inside "System Settings" is called: software-properties-gtk. Well, I've just tried to run it from terminal. It does not work, but I can get these messages:

    Code:
    > software-properties-gtk
    /usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py:40: PyGIWarning: Gdk was imported without specifying a version first. Use gi.require_version('Gdk', '3.0') before import to ensure that the right version gets loaded.
      from gi.repository import GObject, Gdk, Gtk, Gio, GLib
    /usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py:40: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
      from gi.repository import GObject, Gdk, Gtk, Gio, GLib
    Traceback (most recent call last):
      File "/usr/bin/software-properties-gtk", line 101, in <module>
        app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
      File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 98, in __init__
        SoftwareProperties.__init__(self, options=options, datadir=datadir)
      File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 114, in __init__
        self.reload_sourceslist()
      File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 607, in reload_sourceslist
        self.distro.get_sources(self.sourceslist)    
      File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 142, in get_sources
        self.get_mirrors()
      File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 457, in get_mirrors
        self, mirror_template="http://%s.archive.ubuntu.com/ubuntu/")
      File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 166, in get_mirrors
        et = ElementTree(file=fname)
      File "/usr/lib/python3.5/xml/etree/ElementTree.py", line 556, in __init__
        self.parse(file)
      File "/usr/lib/python3.5/xml/etree/ElementTree.py", line 596, in parse
        self._root = parser._parse_whole(source)
    xml.etree.ElementTree.ParseError: syntax error: line 1, column 0
    Any hint ?

  7. #7
    Join Date
    Nov 2017
    Beans
    10
    Distro
    Lubuntu

    Re: Sofware Updater broken

    Have you tried to run both update and upgrade?

    Code:
    sudo apt update && sudo apt upgrade

  8. #8
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    4,520

    Re: Sofware Updater broken

    Quote Originally Posted by flix3 View Post
    Code:
    >
      File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 166, in get_mirrors
        et = ElementTree(file=fname)
      ...
      File "/usr/lib/python3.5/xml/etree/ElementTree.py", line 596, in parse
        self._root = parser._parse_whole(source)
      xml.etree.ElementTree.ParseError: syntax error: line 1, column 0
    I think that's the key.

    Let's look at those Python lines in /usr/lib/python3/dist-packages/aptsources/distro.py, around line 166:
    Code:
            fname = "/usr/share/xml/iso-codes/iso_3166.xml"
            if os.path.exists(fname):
                et = ElementTree(file=fname)
    Easy enough: It's trying to parse /usr/share/xml/iso-codes/iso_3166.xml, but encountering a syntax error.
    That xml file is corrupt or changed or otherwise not valid xml.

    So let's see what package provides that corrupt file:
    Code:
    $ dpkg -S /usr/share/xml/iso-codes/iso_3166.xml
    iso-codes: /usr/share/xml/iso-codes/iso_3166.xml
    There you are: Try reinstalling the 'iso-codes' package.

    Code:
    sudo apt install --reinstall iso-codes
    Last edited by ian-weisser; December 9th, 2017 at 04:15 AM.

  9. #9
    Join Date
    Sep 2013
    Beans
    36

    Wink Re: Sofware Updater broken

    @shintaomonk:
    Yes, it works because apt works perfectly on the terminal: it's just a GUI problem, or something like that.

    Quote Originally Posted by ian-weisser View Post
    I think that's the key.
    Looking at the code, it's tying to parse /usr/share/xml/iso-codes/iso_3166.xml, but encountering a syntax error- that file is corrupt or changes or otherwise not valid xml.

    So let's see what package provides that corrupt file:
    Code:
    $ dpkg -S /usr/share/xml/iso-codes/iso_3166.xml
    iso-codes: /usr/share/xml/iso-codes/iso_3166.xml
    There you are: Try reinstalling the 'iso-codes' package.

    Code:
    sudo apt install --reinstall iso-codes
    [SOLVED] Thank you very much! That fixed both "Software Updater" and "Software and Updates" in a single shot!
    Wow! You know how to track down and solve error logs!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •