GUI应用程序Py2EXE中的BeautifulSoup4错误

时间:2013-05-15 22:51:50

标签: python beautifulsoup runtime-error py2exe

我已经构建了一个使用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解压缩。这会导致它吗?

1 个答案:

答案 0 :(得分:0)

它假设是BeautifulSoap4 launchpad上描述的html5lib错误:

  

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