Wednesday, October 31, 2012

BeautifulSoup v4.1.3 patch

Apparently a tag such as the following will break BeautifulSoup when using HTML5lib:

<svg xmlns="" xmlns:xlink="">

  File "/home/external/html5lib/treebuilders/", line 291, in insertElementNormal
    element.attributes = token["data"]
  File "/home/external/bs4/builder/", line 147, in setAttributes
    new_name = NamespacedAttribute(*name)
  File "/home/external/bs4/", line 30, in __new__
    obj = unicode.__new__(cls, prefix + ":" + name)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

No comments:

Post a Comment