PythonElementClassLookup throws error when reaches comments
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
Fix Released
|
Low
|
scoder |
Bug Description
Python : sys.version_
lxml.etree : (4, 0, 0, 0)
libxml used : (2, 9, 5)
libxml compiled : (2, 9, 5)
libxslt used : (1, 1, 30)
To reproduce:
import lxml.etree as et
class MyLookup(
def lookup(self, document, element):
return None
parser = et.XMLParser()
parser.
el = et.fromstring(
el.getchildren()
# File "<stdin>", line 1, in <module>
# File "src/lxml/
# File "src/lxml/
# File "src/lxml/
# File "src/lxml/
# File "src/lxml/
# TypeError: Cannot convert lxml.etree.
description: | updated |
Changed in lxml: | |
milestone: | none → 4.1.0 |
status: | Fix Committed → Fix Released |
Fix is here: /github. com/lxml/ lxml/commit/ 098b3110d71e531 498e3c34c915bbb 197635159b
https:/