update-manager crashed with AttributeError in __init__(): module 'platform' has no attribute 'dist'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
update-manager (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
1. `$ lsb_release -rd` returns the following:
```
Description: Ubuntu Focal Fossa (development branch)
Release: 20.04
```
==========
2. `$ apt-cache policy update-manager` returns the following:
```
update-manager:
Installed: 1:19.04.8
Candidate: 1:19.04.8
Version table:
*** 1:19.04.8 500
500 http://
500 http://
100 /var/lib/
```
==========
3. I expected `update-manager` to check for updates, an list any available package updates.
4. I think my `update-manager` crashed while it was getting package update headers.
==========
I had installed `python3.8` from Debian repo and used `update-
```
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1
```
`$ sudo update-alternatives --config python3` returns the following:
```
There are 2 choices for the alternative python3 (providing /usr/bin/python3).
Selection Path Priority Status
-------
* 0 /usr/bin/python3.8 2 auto mode
1 /usr/bin/python3.7 1 manual mode
2 /usr/bin/python3.8 2 manual mode
Press <enter> to keep the current choice[*], or type selection number:
```
`$ journalctl | grep "update-manager"` returned the following:
```
Jan 09 00:46:14 nick-CM1630 sudo[11035]: nick : TTY=pts/0 ; PWD=/home/nick ; USER=root ; COMMAND=
Jan 09 00:46:16 nick-CM1630 dbus-daemon[846]: [system] Activating service name='org.
Jan 09 00:46:28 nick-CM1630 update-
Jan 09 00:51:00 nick-CM1630 whoopsie[30066]: [00:51:00] Parsing /var/crash/
Jan 09 00:51:01 nick-CM1630 whoopsie[30066]: [00:51:00] Uploading /var/crash/
Jan 09 00:51:03 nick-CM1630 sudo[13969]: root : TTY=unknown ; PWD=/root ; USER=nick ; ENV=DBUS_
```
Debug log returned by `update-manager`:
```
DEBUG:AptClient
DEBUG:root:
DEBUG:root:
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.dist = dist if dist else platform.dist()[2]
```
Found (3) files in `/var/crash`. I assume that log was "uploaded".
- /var/crash/
- /var/crash/
- /var/crash/
To solve my issue, I used `$ sudo update-alternatives --config python3` to give `python3.7` priority over `python3.8`:
```
There are 2 choices for the alternative python3 (providing /usr/bin/python3).
Selection Path Priority Status
-------
* 0 /usr/bin/python3.8 2 auto mode
1 /usr/bin/python3.7 1 manual mode
2 /usr/bin/python3.8 2 manual mode
Press <enter> to keep the current choice[*], or type selection number: 1
update-
```
`$ sudo update-alternatives --config python3` returned:
```
There are 2 choices for the alternative python3 (providing /usr/bin/python3).
Selection Path Priority Status
-------
0 /usr/bin/python3.8 2 auto mode
* 1 /usr/bin/python3.7 1 manual mode
2 /usr/bin/python3.8 2 manual mode
Press <enter> to keep the current choice[*], or type selection number:
```
Additional Actions
Since the "Software Updater" window froze and would not close, I killed the `update-notifier` and `gnome-software` processes using System Monitor. But that failed to close the frozen window. So I used the desktop's top pulldown menu to open another "Software Updater" which successfully opened and listed software updates. I closed the "Software Updater", and installed the updates using `$ sudo apt-get dist-upgrade -y`. Those packages were libmysofa0, libvncclient1, python3-httplib2 and usb-modeswitch, and they all installed successfully.
ProblemType: Crash
DistroRelease: Ubuntu 20.04
Package: update-manager 1:19.04.8
ProcVersionSign
Uname: Linux 5.0.0-37-generic x86_64
ApportVersion: 2.20.11-0ubuntu15
Architecture: amd64
Date: Thu Jan 9 00:46:28 2020
ExecutablePath: /usr/bin/
InstallationDate: Installed on 2020-01-05 (3 days ago)
InstallationMedia: Ubuntu 18.04.3 LTS "Bionic Beaver" - Release amd64 (20190805)
InterpreterPath: /usr/bin/python3.8
PackageArchitec
ProcCmdline: /usr/bin/python3 /usr/bin/
ProcEnviron:
LANG=en_US.UTF-8
TERM=xterm-
PATH=(custom, no user)
SHELL=/bin/bash
Python3Details: /usr/bin/python3.8, Python 3.8.0+, python3-minimal, 3.7.5-1ubuntu1
PythonArgs: ['/usr/
PythonDetails: N/A
SourcePackage: update-manager
Title: update-manager crashed with AttributeError in __init__(): module 'platform' has no attribute 'dist'
UpgradeStatus: Upgraded to focal on 2020-01-07 (1 days ago)
UserGroups:
tags: | removed: need-duplicate-check |
Changed in update-manager (Ubuntu): | |
importance: | Undecided → Medium |
information type: | Private → Public |
Status changed to 'Confirmed' because the bug affects multiple users.