yum fails to start (due to missing import cElementTree which is available)

Bug #209569 reported by sadfub
This bug report is a duplicate of:  Bug #71773: Unable to run Yum in Edgy. Edit Remove
4
Affects Status Importance Assigned to Milestone
yum (Ubuntu)
Confirmed
Undecided
Ralph Janke

Bug Description

If I install yum, it refuses to work:

 root@service-lappi:/usr/lib/python2.5/site-packages# aptitude install yum
 Paketlisten werden gelesen... Fertig
 Abhängigkeitsbaum wird aufgebaut
 Reading state information... Fertig
 Lese erweiterte Statusinformationen
 Initialisiere Paketstatus... Fertig
 Erzeuge Tag-Datenbank... Fertig
 Die folgenden NEUEN Pakete werden zusätzlich automatisch installiert:
   python-celementtree python-urlgrabber
 Die folgenden NEUEN Pakete werden zusätzlich installiert:
   python-celementtree python-urlgrabber yum
 0 Pakete aktualisiert, 3 zusätzlich installiert, 0 werden entfernt und 0 nicht aktualisiert.
 Muss 0B/282kB an Archiven herunterladen. Nach dem Entpacken werden 1352kB zusätzlich belegt sein.
 Wollen Sie fortsetzen? [Y/n/?] Y
 Schreibe erweiterte Statusinformationen... Fertig
 Wähle vormals abgewähltes Paket python-celementtree.
 (Lese Datenbank ... 114517 Dateien und Verzeichnisse sind derzeit installiert.)
 Entpacke python-celementtree (aus .../python-celementtree_1.0.5-9_i386.deb) ...
 Wähle vormals abgewähltes Paket python-urlgrabber.
 Entpacke python-urlgrabber (aus .../python-urlgrabber_3.1.0-3_all.deb) ...
 Wähle vormals abgewähltes Paket yum.
 Entpacke yum (aus .../archives/yum_2.4.0-3.1_all.deb) ...
 Richte python-celementtree ein (1.0.5-9) ...
 Richte python-urlgrabber ein (3.1.0-3) ...

 Richte yum ein (2.4.0-3.1) ...
 /var/lib/python-support/python2.5/yum/__init__.py:1129: Warning: 'with' will become a reserved keyword in Python 2.6
 /var/lib/python-support/python2.5/yum/depsolve.py:73: Warning: 'with' will become a reserved keyword in Python 2.6
 /var/lib/python-support/python2.5/yum/repos.py:236: Warning: 'with' will become a reserved keyword in Python 2.6
 /var/lib/python-support/python2.5/yum/repos.py:260: Warning: 'with' will become a reserved keyword in Python 2.6
 /var/lib/python-support/python2.5/yum/repos.py:263: Warning: 'with' will become a reserved keyword in Python 2.6
 /usr/share/yum-cli/cli.py:614: Warning: 'with' will become a reserved keyword in Python 2.6
 /usr/share/yum-cli/cli.py:615: Warning: 'with' will become a reserved keyword in Python 2.6
 /usr/share/yum-cli/cli.py:616: Warning: 'with' will become a reserved keyword in Python 2.6

 Paketlisten werden gelesen... Fertig
 Abhängigkeitsbaum wird aufgebaut
 Reading state information... Fertig
 Lese erweiterte Statusinformationen
 Initialisiere Paketstatus... Fertig
 Schreibe erweiterte Statusinformationen... Fertig
 Erzeuge Tag-Datenbank... Fertig
 root@service-lappi:/usr/lib/python2.5/site-packages# yum
 There was a problem importing one of the Python modules
 required to run yum. The error leading to this problem was:

   No module named cElementTree

 Please install a package which provides this module, or
 verify that the module is installed correctly.

 It's possible that the above module doesn't match the
 current version of Python, which is:
 2.5.1 (r251:54863, Mar 7 2008, 04:10:12)
 [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)]

 If you cannot solve this problem yourself, please send this
 message to <email address hidden>.

Since there is allready a cElementTree in python2.5:

 root@service-lappi:/usr/lib/python2.5/site-packages# dpkg -L python2.5 | grep -i celement
 /usr/lib/python2.5/xml/etree/cElementTree.py

I tried this:

 root@service-lappi:/usr/lib/python2.5/site-packages# PYTHONPATH=$PATHONPATH:/usr/lib/python2.5/xml/etree/ yum
 Traceback (most recent call last):
   File "/usr/bin/yum", line 27, in <module>
     yummain.main(sys.argv[1:])
   File "/usr/share/yum-cli/yummain.py", line 75, in main
     base.getOptionsConfig(args)
   File "/usr/share/yum-cli/cli.py", line 170, in getOptionsConfig
     self.doConfigSetup(fn=opts.conffile, root=root)
   File "/var/lib/python-support/python2.5/yum/__init__.py", line 83, in doConfigSetup
     self.getReposFromConfig()
   File "/var/lib/python-support/python2.5/yum/__init__.py", line 116, in getReposFromConfig
     cfg, sections = config.parseDotRepo(fn)
   File "/var/lib/python-support/python2.5/yum/Errors.py", line 45, in __init__
     YumBaseError.__init__(self)
   File "/var/lib/python-support/python2.5/yum/Errors.py", line 25, in __init__
     self.args = args
 TypeError: 'NoneType' object is not iterable
 root@service-lappi:/usr/lib/python2.5/site-packages#

root@service-lappi:/usr/lib/python2.5/site-packages# uname -a
Linux service-lappi 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 i686 GNU/Linux
root@service-lappi:/usr/lib/python2.5/site-packages# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=7.10
DISTRIB_CODENAME=gutsy
DISTRIB_DESCRIPTION="Ubuntu 7.10"

Revision history for this message
Ralph Janke (txwikinger) wrote :

I can confirm this on hardy

Changed in yum:
assignee: nobody → txwikinger
status: New → Confirmed
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.