我已经构建了一个使用 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。会不会是这样造成的?