python-apt upgrade not working with ValueError
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-apt (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: python-apt
I just updated my system with the latest packages on Hardy, and ran into this error with the python-apt package:
david@Brain:~$ sudo dpkg -i --force-all /var/cache/
(Reading database ... 172067 files and directories currently installed.)
Unpacking python-apt (from .../python-
Traceback (most recent call last):
File "/usr/bin/
main()
File "/usr/bin/
rv = action.
File "/usr/bin/
requested = pyversions.
File "/usr/share/
vinfo = parse_versions(
File "/usr/share/
raise ValueError, 'error parsing Python-Version attribute'
ValueError: error parsing Python-Version attribute
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/
from apport.fileutils import likely_packaged
File "/usr/lib/
from apport.report import Report
File "/usr/lib/
import fileutils
File "/usr/lib/
from packaging_impl import impl as packaging
File "/usr/lib/
import apt
ImportError: No module named apt
Original exception was:
Traceback (most recent call last):
File "/usr/bin/
main()
File "/usr/bin/
rv = action.
File "/usr/bin/
requested = pyversions.
File "/usr/share/
vinfo = parse_versions(
File "/usr/share/
raise ValueError, 'error parsing Python-Version attribute'
ValueError: error parsing Python-Version attribute
dpkg: error processing /var/cache/
subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/
Trying to fix it, I removed the package that was installed (python-
david@Brain:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run `apt-get -f install' to correct these.
The following packages have unmet dependencies:
gdebi-core: Depends: python-apt (>= 0.7.0) but it is not installed
language-
python-apport: Depends: python-apt but it is not installed
python-
python-
unattended-
E: Unmet dependencies. Try using -f.
Needless to say, -f doesn't work. Not entirely sure where to turn next since I'm not much of a python hacker. I will probably pin python-apt to python-
Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 192992, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Feel free to continue to report any other bugs you may find.