lxml raises a TypeError on strings without tags as input
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
Fix Released
|
Low
|
scoder |
Bug Description
>>> import sys
>>> from lxml import etree
>>> print("%-20s: %s" % ('Python', sys.version_info))
Python : sys.version_
>>> print("%-20s: %s" % ('lxml.etree', etree.LXML_
lxml.etree : (3, 6, 0, 0)
>>> print("%-20s: %s" % ('libxml used', etree.LIBXML_
libxml used : (2, 9, 1)
>>> print("%-20s: %s" % ('libxml compiled', etree.LIBXML_
libxml compiled : (2, 9, 1)
>>> print("%-20s: %s" % ('libxslt used', etree.LIBXSLT_
libxslt used : (1, 1, 28)
>>> print("%-20s: %s" % ('libxslt compiled', etree.LIBXSLT_
libxslt compiled : (1, 1, 28)
>>> ## -----
Bug is triggered by:
>>> from lxml.html.
>>> fromstring("")
Or
>>> from lxml.html.
>>> fromstring("foo")
Error:
roots = beautiful_
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
Changed in lxml: | |
status: | Fix Committed → Fix Released |
Still a problem in 3.6.6