This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Upgrade to 20.04: /tmp/ubuntu-release-upgrader is crashing

Tags: solved solved solved
(comma "," separated)
User avatar
michaell
Registered Member
Posts
6
Karma
0
OS
The upgrade GUI notifier appears, I click it, it runs for a bit, and then goes away mysteriously, no crash notification, nothing.

So I go to Konsole and issue:

Code: Select all
$  do-release-upgrade

It runs and shows the culprit. The Python code is crashing in /tmp/ubuntu-release-upgrader-xxxxxxx/DistUpgrade/DistUpgradeQuirks.py:

Code: Select all
AttributeError: 'UbuntuDistroInfo' object has no attribute 'version'

Great. Okay, so this is a bit beyond me.

Here's the rest:

Code: Select all
michael@computer:/var/log/dist-upgrade$ do-release-upgrade
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [819 B]
Get:2 Upgrade tool [1,337 kB]
Fetched 1,338 kB in 0s (0 B/s)
authenticate 'focal.tar.gz' against 'focal.tar.gz.gpg'
extracting 'focal.tar.gz'

Reading cache

Checking package manager
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Hit http://dl.google.com/linux/chrome/deb stable InRelease
Hit http://ppa.launchpad.net/bartbes/love-stable/ubuntu bionic InRelease
Hit http://ca.archive.ubuntu.com/ubuntu bionic InRelease
Hit http://ca.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit http://ca.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit http://ppa.launchpad.net/c.falco/mame/ubuntu bionic InRelease
Hit http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit http://ppa.launchpad.net/cybermax-dexter/sdl2-backport/ubuntu bionic InRelease
Get:1 http://archive.neon.kde.org/user bionic InRelease [131 kB]
Hit https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Hit http://ppa.launchpad.net/exult-team/exult-daily/ubuntu bionic InRelease
Hit http://ppa.launchpad.net/fish-shell/release-3/ubuntu bionic InRelease
Hit https://brave-browser-apt-release.s3.brave.com stable InRelease
Hit http://repo.steampowered.com/steam precise InRelease
Hit http://ppa.launchpad.net/libreoffice/ppa/ubuntu bionic InRelease
Hit http://ppa.launchpad.net/lutris-team/lutris/ubuntu bionic InRelease
Hit https://dl.winehq.org/wine-builds/ubuntu bionic InRelease
Hit http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu bionic InRelease
Hit http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu bionic InRelease
Hit http://linux.teamviewer.com/deb stable InRelease
Hit http://ppa.launchpad.net/papirus/papirus/ubuntu bionic InRelease
Hit https://repo.skype.com/deb stable InRelease
Hit http://ppa.launchpad.net/ubuntuhandbook1/apps/ubuntu bionic InRelease
Hit https://apt.spideroak.com/ubuntu release InRelease
Hit http://archive.canonical.com/ubuntu bionic InRelease
Fetched 131 kB in 6s (0 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done

Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-h702ic6d/DistUpgrade/DistUpgradeQuirks.py", line 208, in _get_from_and_to_version
    di.version('%s' % self.controller.fromDist).split()[0]
AttributeError: 'UbuntuDistroInfo' object has no attribute 'version'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-h702ic6d/focal", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-h702ic6d/DistUpgrade/DistUpgradeMain.py", line 238, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-h702ic6d/DistUpgrade/DistUpgradeController.py", line 2081, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-h702ic6d/DistUpgrade/DistUpgradeController.py", line 1918, in fullUpgrade
    if not self.doPostInitialUpdate():
  File "/tmp/ubuntu-release-upgrader-h702ic6d/DistUpgrade/DistUpgradeController.py", line 924, in doPostInitialUpdate
    self.quirks.run("PostInitialUpdate")
  File "/tmp/ubuntu-release-upgrader-h702ic6d/DistUpgrade/DistUpgradeQuirks.py", line 100, in run
    func()
  File "/tmp/ubuntu-release-upgrader-h702ic6d/DistUpgrade/DistUpgradeQuirks.py", line 119, in focalPostInitialUpdate
    self._get_from_and_to_version()
  File "/tmp/ubuntu-release-upgrader-h702ic6d/DistUpgrade/DistUpgradeQuirks.py", line 214, in _get_from_and_to_version
    (r.version for r in di.get_all("object")
AttributeError: 'UbuntuDistroInfo' object has no attribute 'get_all'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 154, in apport_excepthook
    os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o640), 'wb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_do-release-upgrade.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-h702ic6d/DistUpgrade/DistUpgradeQuirks.py", line 208, in _get_from_and_to_version
    di.version('%s' % self.controller.fromDist).split()[0]
AttributeError: 'UbuntuDistroInfo' object has no attribute 'version'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-h702ic6d/focal", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-h702ic6d/DistUpgrade/DistUpgradeMain.py", line 238, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-h702ic6d/DistUpgrade/DistUpgradeController.py", line 2081, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-h702ic6d/DistUpgrade/DistUpgradeController.py", line 1918, in fullUpgrade
    if not self.doPostInitialUpdate():
  File "/tmp/ubuntu-release-upgrader-h702ic6d/DistUpgrade/DistUpgradeController.py", line 924, in doPostInitialUpdate
    self.quirks.run("PostInitialUpdate")
  File "/tmp/ubuntu-release-upgrader-h702ic6d/DistUpgrade/DistUpgradeQuirks.py", line 100, in run
    func()
  File "/tmp/ubuntu-release-upgrader-h702ic6d/DistUpgrade/DistUpgradeQuirks.py", line 119, in focalPostInitialUpdate
    self._get_from_and_to_version()
  File "/tmp/ubuntu-release-upgrader-h702ic6d/DistUpgrade/DistUpgradeQuirks.py", line 214, in _get_from_and_to_version
    (r.version for r in di.get_all("object")
AttributeError: 'UbuntuDistroInfo' object has no attribute 'get_all'

Any ideas? Is this a neon bug or a Canonical bug?
User avatar
michaell
Registered Member
Posts
6
Karma
0
OS
Okay, I found the answer, it had to do with the Python package python3-distro-info being somehow out of date and not having the version() method that the calling script was looking for.

I found the solution here:

https://askubuntu.com/questions/1182208 ... dec-cant-d

...but slightly modified to be this:

Code: Select all
cd /tmp
wget https://salsa.debian.org/debian/distro-info/raw/master/python/distro_info.py
sudo cp /usr/lib/python3/dist-packages/distro_info.py  /usr/lib/python3/dist-packages/distro_info.py.old
sudo cp                           /tmp/distro_info.py  /usr/lib/python3/dist-packages/distro_info.py

So I'll mark this as solved.
pmbmwtf
Registered Member
Posts
1
Karma
0
sudo python3 -m pip uninstall distro-info
sudo apt reinstall python3-distro-info


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]