View previous topic :: View next topic |
Author |
Message |
hexa Apprentice
Joined: 10 Aug 2005 Posts: 163
|
Posted: Tue Jul 22, 2008 11:00 am Post subject: glsa-check: ImportError: No module named pyexpat |
|
|
Hi,
i decided to upgrade python on one of my servers from 2.4 to 2.5. After the upgrade glsa-check -l fails with:
Code: |
spike ~ # glsa-check -l
[A] means this GLSA was already applied,
[U] means the system is not affected and
[N] indicates that the system might be affected.
Traceback (most recent call last):
File "/usr/bin/glsa-check", line 206, in <module>
sys.exit(summarylist(glsalist))
File "/usr/bin/glsa-check", line 172, in summarylist
myglsa = Glsa(myid, glsaconfig)
File "/usr/lib/gentoolkit/pym/glsa.py", line 414, in __init__
self.read()
File "/usr/lib/gentoolkit/pym/glsa.py", line 432, in read
self.parse(urllib.urlopen(myurl))
File "/usr/lib/gentoolkit/pym/glsa.py", line 446, in parse
self.DOM = xml.dom.minidom.parse(myfile)
File "/usr/lib/python2.5/xml/dom/minidom.py", line 1912, in parse
from xml.dom import expatbuilder
File "/usr/lib/python2.5/xml/dom/expatbuilder.py", line 32, in <module>
from xml.parsers import expat
File "/usr/lib/python2.5/xml/parsers/expat.py", line 4, in <module>
from pyexpat import *
ImportError: No module named pyexpat
spike ~ #
|
So i tried python-updater, recompiling expat version 2. and 1., removing python from old slot, recompiling gentookit,...
Nothing seems to help with this problem. What else can I do?
Let me know if you need more info. Thank you for your time. |
|
Back to top |
|
|
AllenJB Veteran
Joined: 02 Sep 2005 Posts: 1285
|
Posted: Tue Jul 22, 2008 12:14 pm Post subject: |
|
|
According to my system, the file is provided by python itself, and I can't see any USE flags relating to xml.
I would avoid any switching between expat 1 and 2 because of the ABI breakage expat causes. You should be sticking to the stabl version 2 now.
My python 2.5 USE flags are: berkdb gdbm ipv6 ncurses readline sqlite ssl threads -bootstrap -build -doc -examples -tk -ucs2 -wininst
I would check your USE flags against those - particularly ensure that you don't have bootstrap or build enabled (these 2 flags should never be enabled by users). Then try re-emerging python 2.5 |
|
Back to top |
|
|
hexa Apprentice
Joined: 10 Aug 2005 Posts: 163
|
Posted: Tue Jul 22, 2008 12:56 pm Post subject: |
|
|
Hi,
I'm on expat 1. I tried installing expat 2 just to make sure using version 1 isn't a problem. The error persisted.
I also did reemerge of python 2.5, but the problem is exactly the same.
Code: |
spike ~ # emerge python -av
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] dev-lang/python-2.5.2-r5 USE="berkdb gdbm ncurses readline ssl threads -bootstrap -build -doc -examples -ipv6 -sqlite -tk -ucs2 -wininst" 0 kB
Total: 1 package (1 reinstall), Size of downloads: 0 kB
Would you like to merge these packages? [Yes/No] yes
>>> Verifying ebuild Manifests...
>>> Emerging (1 of 1) dev-lang/python-2.5.2-r5 to /
* python-gentoo-patches-2.5.2-r5.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ]
* Python-2.5.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ]
* checking ebuild checksums ;-) ... [ ok ]
* checking auxfile checksums ;-) ... [ ok ]
* checking miscfile checksums ;-) ... [ ok ]
* checking Python-2.5.2.tar.bz2 ;-) ... [ ok ]
* checking python-gentoo-patches-2.5.2-r5.tar.bz2 ;-) ... [ ok ]
>>> Unpacking source...
>>> Unpacking Python-2.5.2.tar.bz2 to /var/tmp/portage/dev-lang/python-2.5.2-r5/work
...
...
...
* Your original Python is still installed and can be accessed via
* /usr/bin/python2.x.
*
* GNU info directory index is up-to-date.
spike ~ # glsa-check -l
[A] means this GLSA was already applied,
[U] means the system is not affected and
[N] indicates that the system might be affected.
Traceback (most recent call last):
File "/usr/bin/glsa-check", line 206, in <module>
sys.exit(summarylist(glsalist))
File "/usr/bin/glsa-check", line 172, in summarylist
myglsa = Glsa(myid, glsaconfig)
File "/usr/lib/gentoolkit/pym/glsa.py", line 414, in __init__
self.read()
File "/usr/lib/gentoolkit/pym/glsa.py", line 432, in read
self.parse(urllib.urlopen(myurl))
File "/usr/lib/gentoolkit/pym/glsa.py", line 446, in parse
self.DOM = xml.dom.minidom.parse(myfile)
File "/usr/lib/python2.5/xml/dom/minidom.py", line 1912, in parse
from xml.dom import expatbuilder
File "/usr/lib/python2.5/xml/dom/expatbuilder.py", line 32, in <module>
from xml.parsers import expat
File "/usr/lib/python2.5/xml/parsers/expat.py", line 4, in <module>
from pyexpat import *
ImportError: No module named pyexpat
spike ~ # find / -name expat.py
/usr/lib/python2.5/xml/parsers/expat.py
spike ~ # equery l expat
[ Searching for package 'expat' in all categories among: ]
* installed packages
[I--] [ ] dev-libs/expat-1.95.8 (0)
|
|
|
Back to top |
|
|
doro1211 Guru
Joined: 06 Jun 2004 Posts: 312
|
Posted: Tue Jul 22, 2008 6:26 pm Post subject: |
|
|
Use eselect-python and set python to 2.5 (might have to emerge eselect-python)
Run python-updater
Run revdep-rebuild -X -i
emerge --oneshot libxml2 libexpat
revdep-rebuild -X -i again
is what I'd probably try. |
|
Back to top |
|
|
mikegpitt Advocate
Joined: 22 May 2004 Posts: 3224
|
Posted: Sun Aug 03, 2008 4:56 pm Post subject: |
|
|
Having the same issue here. I've run a revdep-rebuild and it didn't pick up anything. I also reemerged libxml2 and =expat-1.95.8 but glsa-check still bombs out:
Code: | # glsa-check --list affected
Traceback (most recent call last):
File "/usr/bin/glsa-check", line 148, in <module>
myglsa = Glsa(x, glsaconfig)
File "/usr/lib/gentoolkit/pym/glsa.py", line 414, in __init__
self.read()
File "/usr/lib/gentoolkit/pym/glsa.py", line 432, in read
self.parse(urllib.urlopen(myurl))
File "/usr/lib/gentoolkit/pym/glsa.py", line 446, in parse
self.DOM = xml.dom.minidom.parse(myfile)
File "/usr/lib/python2.5/xml/dom/minidom.py", line 1912, in parse
from xml.dom import expatbuilder
File "/usr/lib/python2.5/xml/dom/expatbuilder.py", line 32, in <module>
from xml.parsers import expat
File "/usr/lib/python2.5/xml/parsers/expat.py", line 4, in <module>
from pyexpat import *
ImportError: No module named pyexpat |
|
|
Back to top |
|
|
mikegpitt Advocate
Joined: 22 May 2004 Posts: 3224
|
Posted: Mon Aug 04, 2008 5:20 pm Post subject: |
|
|
I also tried the upgrade to expat-2.x, and it didn't solve anything. |
|
Back to top |
|
|
mikegpitt Advocate
Joined: 22 May 2004 Posts: 3224
|
Posted: Mon Aug 04, 2008 6:57 pm Post subject: |
|
|
I think I solved things. It looks like there is a missing dependency for pyxml. Emerge dev-python/pyxml and the error goes away. |
|
Back to top |
|
|
hexa Apprentice
Joined: 10 Aug 2005 Posts: 163
|
Posted: Tue Aug 05, 2008 7:44 am Post subject: |
|
|
LOL!
I gave up in this for now. I guess you solved my problems. Sometimes is best to wait.
Thanx.
Also make a bug report for missing dependency. |
|
Back to top |
|
|
depontius Advocate
Joined: 05 May 2004 Posts: 3509
|
Posted: Sun Feb 22, 2009 11:29 am Post subject: |
|
|
I've been running glsa-check in cron.daily for years, and just got bit by this, this morning. Yesterday I did a general update, so that's probably what broke it, but gentoolkit wasn't one of the packages I updated. This morning I found that pyxml was not installed on that system, and installing it appears to have fixed the problem.
Any idea of what happened? _________________ .sigs waste space and bandwidth |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9530 Location: beyond the rim
|
Posted: Sun Feb 22, 2009 1:47 pm Post subject: |
|
|
The "usual" problems between the standard python xml modules and pyxml (sometimes pyxml solves the problems, sometimes it creates them) that have existed for years. |
|
Back to top |
|
|
hexa Apprentice
Joined: 10 Aug 2005 Posts: 163
|
Posted: Tue Mar 24, 2009 9:03 am Post subject: |
|
|
Someone should really fix this dependency. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|