
Deal lxml Developers, I want to use your library for some projects that I will need XML parsing and XSD verification. I am attempting to install lxml 3.2.1 onto a RHEL 6.1 server which has python 2.6.6 installed. I did not use pip to build and install lxml, rather I used the 'python setup.py install'. Everything seemed to build and install fine. I was able to run through a few tutorials with out any issue. My problem came when I decided to try and run the unit tests that you have provided. I get one failure (see bottom of this E-Mail) when I run the 'make test' or 'python test.py -p -v' command. I have tried this on lxml versions of 3.1.2, 3.2.0, and 3.2.1 and I see the same test error on each release. I have attempted to sower the web, and the lxml mailing list archives to see if I could find any information on what is causing this test to fail, but I have come up empty. I am hoping that one of you can tell me what I am doing wrong, or what I can to to get this test to pass. Thanks so much for your time, - Chris # make test Skipping tests in lxml.cssselect - external cssselect package is not installed Comparing with ElementTree 1.2.6 TESTED VERSION: 3.2.1 Python: (2, 6, 6, 'final', 0) lxml.etree: (3, 2, 1, 0) libxml used: (2, 7, 6) libxml compiled: (2, 7, 6) libxslt used: (1, 1, 26) libxslt compiled: (1, 1, 26) 1479/1479 (100.0%): Doctest: xpathxslt.txt ====================================================================== ERROR: test_feed_parser_unicode (lxml.tests.test_elementtree.ETreeTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python2.6/unittest.py", line 278, in run testMethod() File "/root/chris/lxml-3.2.1/src/lxml/tests/test_elementtree.py", line 3444, in test_feed_parser_unicode parser.feed(_str('<ro')) File "parser.pxi", line 1177, in lxml.etree._FeedParser.feed (src/lxml/lxml.etree.c:90354) File "parser.pxi", line 569, in lxml.etree._ParserContext._handleParseResult (src/lxml/lxml.etree.c:84648) File "parser.pxi", line 676, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:85816) File "parser.pxi", line 627, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:85308) XMLSyntaxError: None ---------------------------------------------------------------------- Ran 1479 tests in 14.117s FAILED (errors=1)

Am 22.05.2013 19:54, schrieb Lindykid:
Deal lxml Developers,
I want to use your library for some projects that I will need XML parsing and XSD verification. I am attempting to install lxml 3.2.1 onto a RHEL 6.1 server which has python 2.6.6 installed. I did not use pip to build and install lxml, rather I used the 'python setup.py install'. Everything seemed to build and install fine. I was able to run through a few tutorials with out any issue. My problem came when I decided to try and run the unit tests that you have provided. I get one failure (see bottom of this E-Mail) when I run the 'make test' or 'python test.py -p -v' command. I have tried this on lxml versions of 3.1.2, 3.2.0, and 3.2.1 and I see the same test error on each release. I have attempted to sower the web, and the lxml mailing list archives to see if I could find any information on what is causing this test to fail, but I have come up empty. I am hoping that one of you can tell me what I am doing wrong, or what I can to to get this test to pass.
Thanks so much for your time, - Chris
# make test Skipping tests in lxml.cssselect - external cssselect package is not installed Comparing with ElementTree 1.2.6
TESTED VERSION: 3.2.1 Python: (2, 6, 6, 'final', 0) lxml.etree: (3, 2, 1, 0) libxml used: (2, 7, 6) libxml compiled: (2, 7, 6) libxslt used: (1, 1, 26) libxslt compiled: (1, 1, 26)
1479/1479 (100.0%): Doctest: xpathxslt.txt ====================================================================== ERROR: test_feed_parser_unicode (lxml.tests.test_elementtree.ETreeTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python2.6/unittest.py", line 278, in run testMethod() File "/root/chris/lxml-3.2.1/src/lxml/tests/test_elementtree.py", line 3444, in test_feed_parser_unicode parser.feed(_str('<ro')) File "parser.pxi", line 1177, in lxml.etree._FeedParser.feed (src/lxml/lxml.etree.c:90354) File "parser.pxi", line 569, in lxml.etree._ParserContext._handleParseResult (src/lxml/lxml.etree.c:84648) File "parser.pxi", line 676, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:85816) File "parser.pxi", line 627, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:85308) XMLSyntaxError: None
My educated guess is that it's an issue with libxml2. The 2.7.x versions below 2.7.8 are known to have varying minor issues. If you can't (easily) upgrade your system library, consider a static lxml build, preferably using the latest libxml2 2.9.x release. Alternatively, test your own code with what you have and if that works, it's unlikely to magically start failing without modifications. Bugs in libxml2 often just impact specific features (such as push parsing above), not all of lxml. Stefan
participants (2)
-
Lindykid
-
Stefan Behnel