Sudden pyexpat error with ElementTree

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Simon Pickles

    Sudden pyexpat error with ElementTree

    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_D ecode
    >>>
    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



  • Stefan Behnel

    #2
    Re: Sudden pyexpat error with ElementTree

    Simon Pickles wrote:
    ImportError:
    /usr/lib/python2.5/site-packages/_xmlplus/parsers/pyexpat.so: undefined
    symbol: PyUnicodeUCS4_D ecode
    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

    Comment

    Working...