0

我已经构建了一个使用 BeautifulSoup4 的 GUI 应用程序。经过反复尝试最终打开它,该应用程序无法正常工作,并在我关闭它时抛出一个信息框,说要检查日志。这就是日志所说的:

Traceback (most recent call last):
  File "main.py", line 16, in newessay
  File "essay.pyc", line 10, in __init__
  File "essay.pyc", line 36, in buildDocument
  File "bs4\element.pyc", line 935, in __getattr__
  File "bs4\element.pyc", line 1146, in find
  File "bs4\element.pyc", line 1167, in find_all
  File "bs4\element.pyc", line 495, in _find_all
  File "bs4\element.pyc", line 1185, in descendants
AttributeError: 'NoneType' object has no attribute 'next_element'

你知道为什么会这样吗?BeautifulSoup4 包含在库中,因为我已解压缩了 .egg。会不会是这样造成的?

4

1 回答 1

0

它假设是BeautifulSoap4 启动板上描述的 html5lib 错误:

html5lib 树构建器有时会创建没有 next_element 的标签

于 2013-10-08T15:16:06.180 回答