[Bug 1898891] Re: anacron cron.weekly error: AttributeError: module 'platform' has no attribute 'linux_distribution'
Tim Graham
1898891 at bugs.launchpad.net
Tue Sep 7 13:29:44 UTC 2021
The patched file is part of the discontinued Ubuntu Software Center
package which hasn't been updated since Ubuntu 16.04.
$ dpkg -S /usr/share/software-center/softwarecenter/distro/__init__.py
software-center: /usr/share/software-center/softwarecenter/distro/__init__.py
After uninstalling the obsolete package:
$ sudo apt remove software-center
update-apt-xapian-index no longer crashes.
** Changed in: anacron (Ubuntu)
Status: Confirmed => Invalid
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to anacron in Ubuntu.
https://bugs.launchpad.net/bugs/1898891
Title:
anacron cron.weekly error: AttributeError: module 'platform' has no
attribute 'linux_distribution'
Status in anacron package in Ubuntu:
Invalid
Bug description:
Ever since upgrading to Xubuntu 20.04, anacron throws the following error weekly. This seems to be a common problem reported on the web regarding python 3.8. Apparently some file or library is outdated, but I have not seen this error reported in relation to anacron.
----------------------------------------------
Subject: Anacron job 'cron.weekly' on <machine>.com
/etc/cron.weekly/apt-xapian-index:
ERROR:root:DebFileApplication import
Traceback (most recent call last):
File "/usr/share/software-center/softwarecenter/db/__init__.py", line 6, in
<module>
from .debfile import DebFileApplication, DebFileOpenError
File "/usr/share/software-center/softwarecenter/db/debfile.py", line 25, in
<module>
from softwarecenter.db.application import Application, AppDetails
File "/usr/share/software-center/softwarecenter/db/application.py", line 28,
in <module>
import softwarecenter.distro
File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 201,
in <module>
distro_instance = _get_distro()
File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 168,
in _get_distro
distro_info = platform.linux_distribution()
AttributeError: module 'platform' has no attribute 'linux_distribution'
Traceback (most recent call last):
File "/usr/sbin/update-apt-xapian-index", line 104, in <module>
if not indexer.setupIndexing(force=opts.force, system=opts.pkgfile is None):
File "/usr/lib/python3/dist-packages/axi/indexer.py", line 473, in
setupIndexing
self.plugins = Plugins(progress=self.progress, system=system)
File "/usr/lib/python3/dist-packages/axi/indexer.py", line 98, in __init__
addon = Addon(fullname, **kw)
File "/usr/lib/python3/dist-packages/axi/indexer.py", line 53, in __init__
self.module = imp.load_source("axi.plugin_" + self.name, fname)
File "/usr/lib/python3.8/imp.py", line 171, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 702, in _load
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/share/apt-xapian-index/plugins/software_center.py", line 13, in
<module>
from softwarecenter.db.update import (
File "/usr/share/software-center/softwarecenter/db/update.py", line 33, in
<module>
from softwarecenter.backend.scagent import SoftwareCenterAgent
File "/usr/share/software-center/softwarecenter/backend/scagent.py", line 30,
in <module>
from softwarecenter.distro import get_distro, get_current_arch
File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 201,
in <module>
distro_instance = _get_distro()
File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 168,
in _get_distro
distro_info = platform.linux_distribution()
AttributeError: module 'platform' has no attribute 'linux_distribution'
run-parts: /etc/cron.weekly/apt-xapian-index exited with return code 1
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/anacron/+bug/1898891/+subscriptions
More information about the foundations-bugs
mailing list