PyCentralError: package has no field Python-Version

Bug #195551 reported by Léa GRIS
228
Affects Status Importance Assigned to Milestone
python-central (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: apport

Fail to install/upgrade

[...]
Préparation du remplacement de apport 0.101 (en utilisant .../archives/apport_0.103_all.deb) ...
 * Stopping automatic crash report generation: apport
   ...done.
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1594, in <module>
    main()
  File "/usr/bin/pycentral", line 1588, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 1082, in run
    old_pkg.read_version_info()
  File "/usr/bin/pycentral", line 602, in read_version_info
    raise PyCentralError, "package has no field Python-Version"
__main__.PyCentralError: package has no field Python-Version
dpkg : erreur de traitement de /var/cache/apt/archives/apport_0.103_all.deb (--unpack) :
 le sous-processus pre-installation script a retourné une erreur de sortie d'état 1

ProblemType: Package
Architecture: i386
CrashReports:
 600:0:0:8786:2008-02-25 21:07:01.000000000 +0100:2008-02-25 21:07:02.000000000 +0100:/var/crash/_usr_bin_pycentral.0.crash
 600:0:0:62834:2008-02-25 20:41:50.000000000 +0100:2008-02-25 20:41:51.000000000 +0100:/var/crash/apport.0.crash
Date: Mon Feb 25 20:41:51 2008
DistroRelease: Ubuntu 8.04
ErrorMessage: le sous-processus pre-installation script a retourné une erreur de sortie d'état 1
NonfreeKernelModules: nvidia
Package: apport 0.101
PackageArchitecture: all
SourcePackage: apport
Title: package apport 0.101 failed to install/upgrade: le sous-processus pre-installation script a retourné une erreur de sortie d'état 1
Uname: Linux 2.6.24-8-generic i686

Revision history for this message
Léa GRIS (lea-gris) wrote :
Revision history for this message
Léa GRIS (lea-gris) wrote :
Download full text (5.7 KiB)

root@lea-laptop:~# export LANG=C
root@lea-laptop:~# aptitude update
Hit http://archive.ubuntu.com hardy Release.gpg
Hit http://archive.ubuntu.com hardy-updates Release.gpg
Hit http://archive.ubuntu.com hardy-security Release.gpg
Hit http://archive.ubuntu.com hardy-proposed Release.gpg
Hit http://archive.ubuntu.com hardy-backports Release.gpg
Hit http://archive.ubuntu.com hardy Release
Hit http://archive.ubuntu.com hardy-updates Release
Hit http://archive.ubuntu.com hardy-security Release
Hit http://archive.ubuntu.com hardy-proposed Release
Hit http://archive.ubuntu.com hardy-backports Release
Hit http://archive.ubuntu.com hardy/main Packages
Hit http://archive.ubuntu.com hardy/restricted Packages
Hit http://archive.ubuntu.com hardy/restricted Sources
Hit http://archive.ubuntu.com hardy/main Sources
Hit http://archive.ubuntu.com hardy/multiverse Sources
Hit http://archive.ubuntu.com hardy/universe Sources
Hit http://archive.ubuntu.com hardy/universe Packages
Hit http://archive.ubuntu.com hardy/multiverse Packages
Hit http://archive.ubuntu.com hardy-updates/main Packages
Hit http://archive.ubuntu.com hardy-updates/restricted Packages
Hit http://archive.ubuntu.com hardy-updates/restricted Sources
Hit http://archive.ubuntu.com hardy-updates/main Sources
Hit http://archive.ubuntu.com hardy-updates/multiverse Sources
Hit http://archive.ubuntu.com hardy-updates/universe Sources
Hit http://archive.ubuntu.com hardy-updates/universe Packages
Hit http://archive.ubuntu.com hardy-updates/multiverse Packages
Hit http://archive.ubuntu.com hardy-security/main Packages
Hit http://archive.ubuntu.com hardy-security/restricted Packages
Hit http://archive.ubuntu.com hardy-security/restricted Sources
Hit http://archive.ubuntu.com hardy-security/main Sources
Hit http://archive.ubuntu.com hardy-security/multiverse Sources
Hit http://archive.ubuntu.com hardy-security/universe Sources
Hit http://archive.ubuntu.com hardy-security/universe Packages
Hit http://archive.ubuntu.com hardy-security/multiverse Packages
Hit http://archive.ubuntu.com hardy-proposed/restricted Packages
Hit http://archive.ubuntu.com hardy-proposed/main Packages
Hit http://archive.ubuntu.com hardy-proposed/multiverse Packages
Hit http://archive.ubuntu.com hardy-proposed/universe Packages
Hit http://archive.ubuntu.com hardy-proposed/restricted Sources
Hit http://archive.ubuntu.com hardy-proposed/main Sources
Hit http://archive.ubuntu.com hardy-proposed/multiverse Sources
Hit http://archive.ubuntu.com hardy-proposed/universe Sources
Hit http://archive.ubuntu.com hardy-backports/restricted Packages
Hit http://archive.ubuntu.com hardy-backports/main Packages
Hit http://archive.ubuntu.com hardy-backports/multiverse Packages
Hit http://archive.ubuntu.com hardy-backports/universe Packages
Hit http://archive.ubuntu.com hardy-backports/restricted Sources
Hit http://archive.ubuntu.com hardy-backports/main Sources
Hit http://archive.ubuntu.com hardy-backports/multiverse Sources
Hit http://archive.ubuntu.com hardy-backports/universe Sources
Reading package lists... Done

root@lea-laptop:~# aptitude full-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Read...

Read more...

Revision history for this message
Daniel Hahler (blueyed) wrote :

This appears to be a problem with python-central.
What version of python-central have you installed? (you can see this with e.g. "dpkg -s python-central")

Changed in apport:
assignee: nobody → blueyed
importance: Undecided → Medium
status: New → Incomplete
description: updated
Revision history for this message
Daniel Hahler (blueyed) wrote :

Re-assigning to apport. From the changelog, it switched to python-central in 0.102 and you're trying to upgrade from 0.101 to 0.103.
I haven't experienced this problem, but have upgraded to 0.102 before.. maybe there's the problem?

Changed in python-central:
assignee: blueyed → nobody
Revision history for this message
Léa GRIS (lea-gris) wrote :

dpkg -s python-central
Package: python-central
Status: install ok installed
Priority: standard
Section: python
Installed-Size: 224
Maintainer: Matthias Klose <email address hidden>
Architecture: all
Version: 0.5.50ubuntu7
Depends: python (>= 2.4.3-10)
Conflicts: debhelper (<< 5.0.37.3ubuntu2)
Description: register and build utility for Python packages
 This package provides support for building and installing
 python modules independent of the current installed Python
 version.

Revision history for this message
Léa GRIS (lea-gris) wrote : Workaround Re: PyCentralError: package has no field Python-Version
Download full text (3.9 KiB)

Finally I was able to upgrade to 0.103 by installing 0.102 first

wget http://archive.ubuntu.com/ubuntu/pool/main/a/apport/apport_0.102_all.deb
dpkg -i apport_0.102_all.deb
Selecting previously deselected package apport.
(Reading database ... 201684 files and directories currently installed.)
Unpacking apport (from apport_0.102_all.deb) ...
Setting up apport (0.102) ...
 * Starting automatic crash report generation: apport [ OK ]
Unknown media type in type 'x-content/video-vcd'

Unknown media type in type 'x-content/video-svcd'

Unknown media type in type 'x-content/video-dvd'

Unknown media type in type 'x-content/image-dcf'

Unknown media type in type 'x-content/audio-cdda'

Unknown media type in type 'x-content/blank-cd'

Unknown media type in type 'x-content/blank-dvd'

Unknown media type in type 'x-content/blank-bd'

Unknown media type in type 'x-content/blank-hddvd'

Unknown media type in type 'x-content/audio-dvd'

Unknown media type in type 'x-content/video-bluray'

Unknown media type in type 'x-content/video-hddvd'

Unknown media type in type 'x-content/image-picturecd'

Unknown media type in type 'x-content/audio-player'

Unknown media type in type 'x-content/software'
# aptitude full-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done
Building tag database... Done
The following packages will be upgraded:
  apport
1 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/105kB of archives. After unpacking 4096B will be used.
Do you want to continue? [Y/n/?]
Writing extended state information... Done
Reading changelogs... Done
(Reading database ... 201721 files and directories currently installed.)
Preparing to replace apport 0.102 (using .../archives/apport_0.103_all.deb) ...
 * Stopping automatic crash report generation: apport [ OK ]
Unpacking replacement apport ...
Unknown media type in type 'x-content/video-vcd'

Unknown media type in type 'x-content/video-svcd'

Unknown media type in type 'x-content/video-dvd'

Unknown media type in type 'x-content/image-dcf'

Unknown media type in type 'x-content/audio-cdda'

Unknown media type in type 'x-content/blank-cd'

Unknown media type in type 'x-content/blank-dvd'

Unknown media type in type 'x-content/blank-bd'

Unknown media type in type 'x-content/blank-hddvd'

Unknown media type in type 'x-content/audio-dvd'

Unknown media type in type 'x-content/video-bluray'

Unknown media type in type 'x-content/video-hddvd'

Unknown media type in type 'x-content/image-picturecd'

Unknown media type in type 'x-content/audio-player'

Unknown media type in type 'x-content/software'

Setting up apport (0.103) ...
 * Starting automatic crash report generation: apport [ OK ]
Unknown media type in type 'x-content/video-vcd'

Unknown media type in type 'x-content/video-svcd'

Unknown media type in type 'x-content/video-dvd'

Unknown media type in type 'x-conte...

Read more...

Changed in apport:
status: Incomplete → Confirmed
Daniel Hahler (blueyed)
Changed in apport:
status: Confirmed → Triaged
Revision history for this message
Daniel Hahler (blueyed) wrote :

Re-assigning to python-central: this appears to happen if the currently installed version has no Python-Version header (in "dpkg -s"), but the version being installed expects it to have one. I've only took a quick look at the code yesterday, so don't rely on my info, please..

Revision history for this message
Shawn Wheatley (swheatley) wrote :

Following the same steps as Léa GRIS above, I was able to fix my apport installation.

Revision history for this message
Dave Stroud (bigdavesr) wrote :

I allso fixed problem the same way.

Revision history for this message
biomathman (bes-shapon) wrote : Re: [Bug 195551] Re: PyCentralError: package has no field Python-Version

Thanks! I followed the instructions in the bug report and it fixed
things for me.

Dave Stroud wrote:
> I allso fixed problem the same way.
>
>

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-central - 0.5.60ubuntu4

---------------
python-central (0.5.60ubuntu4) hardy; urgency=low

  * Don't crash on package upgrades from versions not using pycentral.
    LP: #195551.
  * Remove byte code for files in private modules, removed in the new version.

 -- Matthias Klose <email address hidden> Wed, 27 Feb 2008 11:02:22 +0100

Changed in python-central:
status: Triaged → Fix Released
Revision history for this message
brenobm (breno-brenomachado) wrote :

Hi.. i found a solution in ==> https://bugs.launchpad.net/ubuntu/+source/python-central/+bug/75557

where tell to us change the line of pycentral:

         if version == default_version:
                default_runtime = rt

for

         if version == default_version or version.replace('.', '') == default_version:
                default_runtime = rt

---

The instructions of Léa didnt work with me...

(sorry for my english)

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.