1. Store
  2. Apps
  3. Hardware
  4. Support
  5. Solutions

ClearFoundation

Forums
Welcome, Guest
Problem with yum -- No module named cElementTree
(1 viewing) 1 Guest
Go to bottomPage: 1
TOPIC: Problem with yum -- No module named cElementTree
#45278
Problem with yum -- No module named cElementTree 2 Years, 1 Month ago  
Hi

a have a problem with yum.
Have anybody an idea, how i can fix?
I have ClearOS 6.2.

Thanks a lot

Code:



yum search ntfs 
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 285, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 136, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 438, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 686, in doCommand
    return base.search(extcmds)
  File "/usr/share/yum-cli/cli.py", line 1030, in search
    for (po, keys, matched_value) in matching:
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 2540, in searchGenerator
    for sack in self.pkgSack.sacks.values():
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 897, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 682, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 294, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 165, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 223, in _check_db_version
    return repo._check_db_version(mdtype)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1256, in _check_db_version
    repoXML = self.repoXML
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1455, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1447, in _getRepoXML
    self._loadRepoXML(text=self)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1437, in _loadRepoXML
    return self._groupLoadRepoXML(text, self._mdpolicy2mdtypes())
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1412, in _groupLoadRepoXML
    if self._commonLoadRepoXML(text):
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1225, in _commonLoadRepoXML
    if self._latestRepoXML(local):
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1194, in _latestRepoXML
    oxml = self._saveOldRepoXML(local)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1053, in _saveOldRepoXML
    xml = self._parseRepoXML(old_local, True)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1036, in _parseRepoXML
    return repoMDObject.RepoMD(self.id, local)
  File "/usr/lib/python2.6/site-packages/yum/repoMDObject.py", line 124, in __init__
    self.parse(srcfile)
  File "/usr/lib/python2.6/site-packages/yum/repoMDObject.py", line 140, in parse
    parser = iterparse(infile)
  File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1169, in cElementTree_iterparse
    _cElementTree_import()
  File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1164, in _cElementTree_import
    import cElementTree
ImportError: No module named cElementTree
You have new mail in /var/spool/mail/root



Steffen
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2012/08/23 12:13 By linuxserversteffen.
The administrator has disabled public write access.
 
#45287
Re: Problem with yum -- No module named cElementTree 2 Years, 1 Month ago  
looks like a horrible python error...which is breaking yum

does /usr/lib64/python2.6/xml/etree/cElementTree.py exist? its part of the python-2.6.6-29.el6_2.2 rpm...

have you applied any third party repo's or updates?
Tim Burgess
Moderator
Posts: 6644
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#45577
Re: Problem with yum -- No module named cElementTree 2 Years, 1 Month ago  
Hello


yes /usr/lib64/python2.6/xml/etree/cElementTree.py exist.

no thirdparty updates, I think so.

and I reinstalld the packed python-2.6.6-29.el6_2.2 rpm.

And I have the same error.

I got this Message:

rpm -q yum python python-elementtree python-sqlite python-urlgrabber rpm-python

yum-3.2.29-30.el6.noarch
python-2.6.6-29.el6_2.2.x86_64
package python-elementtree is not installed
package python-sqlite is not installed
python-urlgrabber-3.9.1-8.el6.noarch
rpm-python-4.8.0-27.el6.x86_64

How can I get the package: python-elementtree ??
rpm -Uhv --force mirror1.timburgess.net/clearos/community...0/os/x86_64/ClearOS/{gpgme-1.1.8-3.el6.x86_64,pygpgme-0.1-18.20090824bzr68.el6.x86_64,python-iniparse-0.3.1-2.1.el6.noarch,python-pycurl-7.19.0-8.el6.x86_64,python-urlgrabber-3.9.1-8.el6.noarch,rpm-python-4.8.0-27.el6.x86_64,yum-3.2.29-30.el6.noarch,yum-metadata-parser-1.1.2-16.el6.x86_64,yum-plugin-fastestmirror-1.1.30-14.el6.noarch}.rpm

doesn't help

I have no idea?!?!


The same error:
Code:


Loaded plugins: clearcenter-marketplace, fastestmirror
ClearCenter Marketplace: fetching repositories...
ClearCenter Marketplace: No module named expat; use SimpleXMLTreeBuilder instead
Loading mirror speeds from cached hostfile
 * clearos: mirror1.timburgess.net
 * clearos-addons: mirror1.timburgess.net
 * clearos-core: mirror1.timburgess.net
 * clearos-extras: mirror1.timburgess.net
 * clearos-updates: mirror1.timburgess.net
 * rpmforge: mirror1.hs-esslingen.de
ClearCenter Marketplace close
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 285, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 136, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 438, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 686, in doCommand
    return base.search(extcmds)
  File "/usr/share/yum-cli/cli.py", line 1030, in search
    for (po, keys, matched_value) in matching:
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 2540, in searchGenerator
    for sack in self.pkgSack.sacks.values():
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 897, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 682, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 294, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 165, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 223, in _check_db_version
    return repo._check_db_version(mdtype)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1256, in _check_db_version
    repoXML = self.repoXML
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1455, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1447, in _getRepoXML
    self._loadRepoXML(text=self)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1437, in _loadRepoXML
    return self._groupLoadRepoXML(text, self._mdpolicy2mdtypes())
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1412, in _groupLoadRepoXML
    if self._commonLoadRepoXML(text):
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1225, in _commonLoadRepoXML
    if self._latestRepoXML(local):
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1194, in _latestRepoXML
    oxml = self._saveOldRepoXML(local)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1053, in _saveOldRepoXML
    xml = self._parseRepoXML(old_local, True)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1036, in _parseRepoXML
    return repoMDObject.RepoMD(self.id, local)
  File "/usr/lib/python2.6/site-packages/yum/repoMDObject.py", line 124, in __init__
    self.parse(srcfile)
  File "/usr/lib/python2.6/site-packages/yum/repoMDObject.py", line 140, in parse
    parser = iterparse(infile)
  File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1169, in cElementTree_iterparse
    _cElementTree_import()
  File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1164, in _cElementTree_import
    import cElementTree
ImportError: No module named cElementTree
You have new mail in /var/spool/mail/root

Steffen
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2012/08/31 09:41 By linuxserversteffen.
The administrator has disabled public write access.
 
#45803
Re: Problem with yum -- No module named cElementTree 2 Years, 1 Month ago  
I am getting the same exact error - as of today. (Used yum this morning with no errors, and now I am having problems.)

Steffen - are you perhaps using plex or crashplan? Those are the only two apps I have which are "self-updating" and I am thinking they may have pushed out a bad update.

On a possibly related note, when I reboot the machine I am getting the system to hang and the only way I can only work on the system by shelling in remotely.
Tim
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#45809
Re: Problem with yum -- No module named cElementTree 2 Years, 1 Month ago  
Alright.. well I think I've solved the problem (albeit with CentOS, but the ClearOS solution is probably very similar)...

Long story short - here's the CentOS solution:
Code:


wget http://isoredirect.centos.org/centos/6.3/os/x86_64/Packages/expat-2.0.1-11.el6_2.x86_64.rpm
sudo rpm -Uvh --force expat-2.0.1-11.el6_2.x86_64.rpm



How I got there...

I tried importing cElementTree in python manually by creating a new shell and doing the following:

Code:

[tim@digitalsoup ~]$ python
Python 2.6.6 (r266:84292, Jun 18 2012, 14:18:47) 
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from xml.etree import cElementTree
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/xml/etree/cElementTree.py", line 3, in <module>
    from _elementtree import *
ImportError: /usr/lib64/python2.6/lib-dynload/pyexpat.so: symbol XML_SetHashSalt, version EXPAT_2_0_1_RH not defined in file libexpat.so.1 with link time reference
>>> quit()



This gave me the "EXPAT_2_0_1_RH not defined" error, so I figured I'd try to reinstall expat from an RPM:

Code:

[tim@digitalsoup ~]$ wget http://isoredirect.centos.org/centos/6.3/os/x86_64/Packages/expat-2.0.1-11.el6_2.x86_64.rpm
[tim@digitalsoup ~]$ sudo rpm -Uvh --force expat-2.0.1-11.el6_2.x86_64.rpm



That seemed to have fixed the python import error:

Code:

[tim@digitalsoup ~]$ python
Python 2.6.6 (r266:84292, Jun 18 2012, 14:18:47) 
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from xml.etree import cElementTree
>>> quit()



Sure enough - yum now appears to be working for me just fine. I have NO IDEA how expat might have gotten corrupted, but everything appears to be working correctly now. Additionally, the boot issue I was having before appears to be fixed as well. The comp starts up just fine now.
Tim
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2012/09/05 15:02 By timcortesi.
The administrator has disabled public write access.
 
#45940
Re: Problem with yum -- No module named cElementTree 2 Years, 1 Month ago  
HI,

yes I had plex but I deinstalled plexmedia server.
Maybe after that I had this problem. Im not so sure at the Moment.

But I'm trying to follow your explanation.
Steffen
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#45943
Re: Problem with yum -- No module named cElementTree 2 Years, 1 Month ago  
You are right.
But your solotionb dosen't work for my Problem.

But you gave me the right way:

I download this
wget mirror2-dc.clearsdn.com/clearos/communit...-11.el6_2.x86_64.rpm

try this
ldd /usr/lib64/python2.6/lib-dynload/pyexpat.s
and got this:
Code:

 
ldd /usr/lib64/python2.6/lib-dynload/pyexpat.so
        linux-vdso.so.1 =>  (0x00007fffc6fe6000)
        libexpat.so.1 => /usr/lib/plexmediaserver/libexpat.so.1 (0x00007fe549d74000)
        libpython2.6.so.1.0 => /usr/lib64/libpython2.6.so.1.0 (0x00007fe5499b9000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fe54979c000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fe54940a000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fe549206000)
        libutil.so.1 => /lib64/libutil.so.1 (0x00007fe549002000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fe548d7e000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fe54a1b5000)



than expanded:
rpm2cpio expat-2.0.1-11.el6_2.x86_64.rpm | cpio -idv

and copy the libexpand.so and the link, from the original rpm to /usr/lib/plexmediaserver/

not fine but it works.

I hope the next update will be fix the plexmediaserver errors and failure.

Thanks
Steffen
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2012/09/10 14:29 By linuxserversteffen.
The administrator has disabled public write access.
 
#47364
Re: Problem with yum -- No module named cElementTree 1 Year, 12 Months ago  
Hi

I have a better solution.
go to /etc/ld.so.conf
and delete /usr/lib/plexmediaserver
add /usr/lib64
goto /usr/lib64

and execute ldconfig

reboot

Thanks for all helpers and ClearOS developers. Nice work.
Steffen
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
  get the latest posts directly to your desktop