Problem Description
While running the Distribution Upgrade to Trixie, I received this Traceback:
Steps to Reproduce
Login to FreedomBox.
Go to Software Update
Click on Distribution Update
Expected Results
Upgrade completes with no errors
Actual results
Received following flash message
type or paste code here
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/django/core/handlers/base.py”, line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/usr/lib/python3/dist-packages/django/views/generic/base.py”, line 105, in view
return self.dispatch(request, *args, **kwargs)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/django/views/generic/base.py”, line 144, in dispatch
return handler(request, *args, **kwargs)
File “/usr/lib/python3/dist-packages/django/views/generic/base.py”, line 228, in get
context = self.get_context_data(**kwargs)
File “/usr/lib/python3/dist-packages/plinth/modules/upgrades/views.py”, line 94, in get_context_data
context[‘status’] = distupgrade.get_status()
~~~~~~~~~~~~~~~~~~~~~~^^
File “/usr/lib/python3/dist-packages/plinth/modules/upgrades/distupgrade.py”, line 158, in get_status
current_codename = _get_sources_list_codename()
File “/usr/lib/python3/dist-packages/plinth/modules/upgrades/distupgrade.py”, line 119, in _get_sources_list_codename
dist = dist.removesuffix(‘-updates’)
^^^^^^^^^^^^^^^^^
AttributeError: ‘NoneType’ object has no attribute ‘removesuffix’
**Information**
* *FreedomBox version*: Prior to upgrade, latest version to date. After upgrade, About Page shows Debian GNU/Linux 13 (trixie) and FreedomBox version 25.9.3
* *Hardware*: Dell Optiplex 9020. 16GB Memroy, 4TB Storage
$ more /etc/apt/sources.list
#deb cdrom:[Debian GNU/Linux 12.2.0 _Bookworm_ - Official amd64 NETINST with firmware 20231007-10:28]/ bookworm main non-free-firmware
deb http://deb.debian.org/debian/ trixie main non-free-firmware
deb-src http://deb.debian.org/debian/ trixie main non-free-firmware
deb http://security.debian.org/debian-security trixie-security main non-free-firmware
deb-src http://security.debian.org/debian-security trixie-security main non-free-firmware
# bookworm-updates, to get updates before a point release is made;
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://deb.debian.org/debian/ trixie-updates main non-free-firmware
deb-src http://deb.debian.org/debian/ trixie-updates main non-free-firmware
# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
I suspect the error may have been caused by attempting to install tt-rss, which seems not to be supported in trixie.
This issue is caused by comments being present in the /etc/apt/sources.list (yep, I messed up ). Distribution upgrade has not been triggered and you system is in same state as before you have triggered distribution upgrade.
For fixing this you will need the latest freedombox package from bookworm-backports (version 25.9.3~bpo12+2). This version likely reached you already as it was made available on Aug 12. You can simply try re-triggering the distribution upgrade. If the problem persists, let us know.
@sunil, I gave it a few tries over the past couple of weeks, but still getting this error when I attempt a distro update:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 105, in view
return self.dispatch(request, *args, **kwargs)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 144, in dispatch
return handler(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 228, in get
context = self.get_context_data(**kwargs)
File "/usr/lib/python3/dist-packages/plinth/modules/upgrades/views.py", line 94, in get_context_data
context['status'] = distupgrade.get_status()
~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3/dist-packages/plinth/modules/upgrades/distupgrade.py", line 158, in get_status
current_codename = _get_sources_list_codename()
File "/usr/lib/python3/dist-packages/plinth/modules/upgrades/distupgrade.py", line 119, in _get_sources_list_codename
dist = dist.removesuffix('-updates')
^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'removesuffix'
Do you have freedombox version 25.9.3~bpo12+2 from bookworm-backports? That is the version the contains the fix. You can also overcome the problem by removing comments from /etc/apt/sources.list. If that does not fix the problem, please post your /etc/apt/sources.list file.
#deb cdrom:[Debian GNU/Linux 12.2.0 _Bookworm_ - Official amd64 NETINST with firmware 20231007-10:28]/ bookworm main non-free-firmware
deb http://deb.debian.org/debian/ trixie main non-free-firmware
deb-src http://deb.debian.org/debian/ trixie main non-free-firmware
deb http://security.debian.org/debian-security trixie-security main non-free-firmware
deb-src http://security.debian.org/debian-security trixie-security main non-free-firmware
# bookworm-updates, to get updates before a point release is made;
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://deb.debian.org/debian/ trixie-updates main non-free-firmware
deb-src http://deb.debian.org/debian/ trixie-updates main non-free-firmware
# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
@nomadicoder Your sources.list already contains “Trixie” (Debian 13) instead of “Bookworm” (Debian 12). Have you manually updated it? Or did you run FreedomBox distribution upgrade already? Anyway, remove the lines with comments to get rid of the error you are facing.
I think the distribution update ran 12 hours ago, after I sent the reply with error and an hour after your reply to that. I looks like all is well now.