Fixed! Uninstalled 2.2 and then easy_install-3.1 lxml /Thanks
Date: Wed, 20 Apr 2011 13:42:15 +0200 From: stefan_ml@behnel.de To: pelle2004@hotmail.com CC: lxml@lxml.de Subject: Re: [lxml] Value error at 'import etree'
Pelle Svensson, 20.04.2011 13:06:
I can't import lxml att all.
test.py source only one line from lxml import etree
[]$ python3 test.py Traceback (most recent call last): File "test.py", line 2, in<module> from lxml import etree File "xmlschema.pxi", line 22, in init lxml.etree (src/lxml/lxml.etree.c:148019) File "xpath.pxi", line 396, in lxml.etree.XPath.__init__ (src/lxml/lxml.etree.c:107688) File "xpath.pxi", line 117, in lxml.etree._XPathEvaluatorBase.__init__ (src/lxml/lxml.etree.c:104888) File "xpath.pxi", line 55, in lxml.etree._XPathContext.__init__ (src/lxml/lxml.etree.c:104232) File "extensions.pxi", line 83, in lxml.etree._BaseContext.__init__ (src/lxml/lxml.etree.c:96555) File "extensions.pxi", line 120, in lxml.etree._BaseContext._to_utf (src/lxml/lxml.etree.c:97031) File "apihelpers.pxi", line 1295, in lxml.etree._utf8 (src/lxml/lxml.etree.c:21267) ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes
Linux Fedora 14 Python 3.1.2 python-lxml.x86_64 2.2.8-1.fc14
There is no official support for lxml 2.2 on Python 3.x. Please use lxml 2.3 instead.
Stefan