1. 程式人生 > >AttributeError: module 'html5lib.treebuilders' has no attribute '_base'

AttributeError: module 'html5lib.treebuilders' has no attribute '_base'

art mod net friend issue error -h 有一個 網上

遇到錯誤:AttributeError: module ‘html5lib.treebuilders‘ has no attribute ‘_base‘
解決:pip install --upgrade html5lib==1.0b8

討論:
網上一:大概就是說html5lib裏面的treebuilders裏面沒有_base這個屬性
去html5lib這個文件夾裏(pip install的文件),找到treebuilders這個文件夾,然後看到裏面的確沒有_base.py。而是有一個base.py。我就把base.py前面加了一個_,改為_base.py。

參考鏈接:

TreeBuilderForHtml5lib ‘module‘ object has no attribute ‘_base‘ #554

https://blog.csdn.net/jifaley/article/details/62231615

https://blog.csdn.net/friendan/article/details/52439031

AttributeError: module 'html5lib.treebuilders' has no attribute '_base'