Exception in "find" when using htm5lib
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Beautiful Soup |
New
|
Undecided
|
Unassigned |
Bug Description
Exception when finding a tag BeautifulSoup4 when html5lib is installed. Does not occur with lxml. See transcript below and attachment (which also contains the transcript).
Also, try a simple soup.find('h1') on this document and it won't be found with html5lib, but can be found with lxml or without either.
$ virtualenv bug
$ bug/bin/pip install BeautifulSoup4
Downloading beautifulsoup4-
...
$ bug/bin/pip install html5lib
Downloading html5lib-
...
$ bug/bin/python
>>> import bs4
>>> bs4.BeautifulSo
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Volumes/
l = self.find_all(name, attrs, recursive, text, 1, **kwargs)
File "/Volumes/
return self._find_
File "/Volumes/
i = next(generator)
File "/Volumes/
current = current.
AttributeError: 'NoneType' object has no attribute 'next_element'