python-apt upgrade not working with ValueError

Bug #193076 reported by Pitabred
0
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/apt/archives/python-apt_0.7.4ubuntu5_i386.deb
(Reading database ... 172067 files and directories currently installed.)
Unpacking python-apt (from .../python-apt_0.7.4ubuntu5_i386.deb) ...
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1593, in <module>
    main()
  File "/usr/bin/pycentral", line 1587, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 1075, in run
    requested = pyversions.requested_versions_for_runtime(version_field, version_only=True)
  File "/usr/share/pycentral-data/pyversions.py", line 172, in requested_versions_for_runtime
    vinfo = parse_versions(vstring)
  File "/usr/share/pycentral-data/pyversions.py", line 58, in parse_versions
    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/python2.5/site-packages/apport_python_hook.py", line 38, in apport_excepthook
    from apport.fileutils import likely_packaged
  File "/usr/lib/python2.5/site-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/lib/python2.5/site-packages/apport/report.py", line 21, in <module>
    import fileutils
  File "/usr/lib/python2.5/site-packages/apport/fileutils.py", line 16, in <module>
    from packaging_impl import impl as packaging
  File "/usr/lib/python2.5/site-packages/apport/packaging_impl.py", line 18, in <module>
    import apt
ImportError: No module named apt

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1593, in <module>
    main()
  File "/usr/bin/pycentral", line 1587, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 1075, in run
    requested = pyversions.requested_versions_for_runtime(version_field, version_only=True)
  File "/usr/share/pycentral-data/pyversions.py", line 172, in requested_versions_for_runtime
    vinfo = parse_versions(vstring)
  File "/usr/share/pycentral-data/pyversions.py", line 58, in parse_versions
    raise ValueError, 'error parsing Python-Version attribute'
ValueError: error parsing Python-Version attribute
dpkg: error processing /var/cache/apt/archives/python-apt_0.7.4ubuntu5_i386.deb (--install):
 subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/python-apt_0.7.4ubuntu5_i386.deb

Trying to fix it, I removed the package that was installed (python-apt_0.7.4ubuntu4) and it took out kubuntu-desktop and some other packages. I then cleaned out my apt cache, and installed kubuntu-desktop to bring in all it's dependencies, and I still get this error, and because of it, this:

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-selector-qt: Depends: python-apt but it is not installed
  python-apport: Depends: python-apt but it is not installed
  python-launchpad-bugs: Depends: python-apt but it is not installed
  python-software-properties: Depends: python-apt (>= 0.6.20ubuntu16) but it is not installed
  unattended-upgrades: Depends: python-apt (>= 0.6.14ubuntu2) but it is not installed
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-apt_0.7.4ubuntu4 until this is resolved. Thanks!

Revision history for this message
Luca Carrogu (motoplux) wrote :

 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.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.