Launchpad

>>> import sys
>>> from lxml import etree
>>> print("%-20s: %s" % ('Python', sys.version_info))
Python : sys.version_ info(major= 2, minor=7, micro=9, releaselevel= 'final' , serial=0)
>>> print("%-20s: %s" % ('lxml.etree', etree.LXML_ VERSION) )
lxml.etree : (3, 6, 0, 0)
>>> print("%-20s: %s" % ('libxml used', etree.LIBXML_ VERSION) )
libxml used : (2, 9, 1)
>>> print("%-20s: %s" % ('libxml compiled', etree.LIBXML_ COMPILED_ VERSION) )
libxml compiled : (2, 9, 1)
>>> print("%-20s: %s" % ('libxslt used', etree.LIBXSLT_ VERSION) )
libxslt used : (1, 1, 28)
>>> print("%-20s: %s" % ('libxslt compiled', etree.LIBXSLT_ COMPILED_ VERSION) )
libxslt compiled : (1, 1, 28)
>>> ## -----

Bug is triggered by:
>>> from lxml.html. soupparser import fromstring
>>> fromstring("")

Or
>>> from lxml.html. soupparser import fromstring
>>> fromstring("foo")

Error:
    roots = beautiful_ soup_tree. contents[ first_element_ idx:last_ element_ idx+1]
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

Read the original on bugs.launchpad.net ↗