Getting Invalid version exception during apt update
Thomas Ward
teward at thomas-ward.net
Wed Jan 4 00:50:30 UTC 2023
You already got a response on this thread from Colin, quoted below:
On Tue, Jan 03, 2023 at 12:04:34PM +0530, probal basak wrote:
> I am getting the below exception while trying to issue apt update:
> Getting this issue since last week. Previously the same thing used to
> work perfectly fine.
This is a bug in appimage-builder. As you can see from the fact that it's installed in /usr/local, it's not supplied by Ubuntu.
The bug is that it's apparently trying to use the Python packaging.version library to parse and compare the version numbers of Ubuntu packages. Ubuntu package versions are not compatible with Python package versions, and it is incorrect to use Python's packaging.version library to do this job.
It looks like this bug was fixed in
https://github.com/AppImageCrafters/appimage-builder/pull/281, although it doesn't seem that there's been a release since that fix landed. I don't know how best to advise you to apply that fix to your system, but presumably you installed this program yourself and so have some idea of how best to upgrade it.
--
Colin Watson (he/him) [cjwatson at ubuntu.com]
From: Ubuntu-devel-discuss <ubuntu-devel-discuss-bounces at lists.ubuntu.com> On Behalf Of probal basak
Sent: Tuesday, January 3, 2023 1:36 AM
To: ubuntu-devel-discuss at lists.ubuntu.com
Subject: Getting Invalid version exception during apt update
Hello Team,
I am getting the below exception while trying to issue apt update:
Getting this issue since last week. Previously the same thing used to work perfectly fine.
Get:13 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [1385 kB]
Fetched 17.1 MB in 5s (3617 kB/s)
Reading package lists... Done
Traceback (most recent call last):
File "/usr/local/bin/appimage-builder", line 8, in <module>
sys.exit(__main__())
File "/usr/local/lib/python3.8/dist-packages/appimagebuilder/__main__.py", line 58, in __main__
invoker.execute(commands)
File "/usr/local/lib/python3.8/dist-packages/appimagebuilder/invoker.py", line 41, in execute
command()
File "/usr/local/lib/python3.8/dist-packages/appimagebuilder/commands/apt_deploy.py", line 46, in __call__
deployed_packages = apt_deploy.deploy(
File "/usr/local/lib/python3.8/dist-packages/appimagebuilder/modules/deploy/apt/deploy.py", line 41, in deploy
self._prepare_apt_venv()
File "/usr/local/lib/python3.8/dist-packages/appimagebuilder/modules/deploy/apt/deploy.py", line 57, in _prepare_apt_venv
apt_core_packages = self._remove_old_packages(apt_core_packages)
File "/usr/local/lib/python3.8/dist-packages/appimagebuilder/modules/deploy/apt/deploy.py", line 113, in _remove_old_packages
if package > latest_packages[pkg_tuple]:
File "/usr/local/lib/python3.8/dist-packages/appimagebuilder/modules/deploy/apt/package.py", line 79, in __gt__
return version.parse(self.version) > version.parse(other.version)
File "/usr/local/lib/python3.8/dist-packages/packaging/version.py", line 52, in parse
return Version(version)
File "/usr/local/lib/python3.8/dist-packages/packaging/version.py", line 197, in __init__
raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: '1.19.7ubuntu3'
Can you please help me to understand what the issue is about? And how to resolve this issue please?
Thanks in advance.
--
Thanks,
Probal Basak.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20230104/3e0b914f/attachment-0001.html>
More information about the Ubuntu-devel-discuss
mailing list