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