[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Sudden pyexpat error with ElementTree

Simon Pickles

2/9/2008 1:50:00 PM

Hi,

I've been using ElementTree for a few weeks without problem, with
Stackless Python.

Suddenly I have an error importing expat, in both application and console:

simon@simon-desktop:~$ python
Python 2.5.2a0 Stackless 3.1b3 060516 (release25-maint:60694M, Feb 9
2008, 13:21:41)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from xml.parsers import expat
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/site-packages/_xmlplus/parsers/expat.py",
line 4, in <module>
from pyexpat import *
ImportError:
/usr/lib/python2.5/site-packages/_xmlplus/parsers/pyexpat.so: undefined
symbol: PyUnicodeUCS4_Decode
>>>

Google shows a few other sufferers, but reveals no answers. I have just
rebuilt python to see if I had messed it up somehow, but the problem
persists.

Thanks for your advice.

Simon



1 Answer

Stefan Behnel

2/9/2008 4:10:00 PM

0

Simon Pickles wrote:
> ImportError:
> /usr/lib/python2.5/site-packages/_xmlplus/parsers/pyexpat.so: undefined
> symbol: PyUnicodeUCS4_Decode

You changed the build-time configuration of your Python installation, so you
should rebuild PyXML for the new interpreter (or uninstall it, as you don't
need it for ElementTree).

Stefan