沒有屬性當我更新了我的包我有這個新的錯誤:beautifulsoup,html5lib:模塊對象有_base
class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
AttributeError: 'module' object has no attribute '_base'
我嘗試更新beautifulsoup
,沒有更多的結果。我該如何解決這個問題?
沒有屬性當我更新了我的包我有這個新的錯誤:beautifulsoup,html5lib:模塊對象有_base
class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
AttributeError: 'module' object has no attribute '_base'
我嘗試更新beautifulsoup
,沒有更多的結果。我該如何解決這個問題?
編輯月,2017年:看來這不起作用任何更多
最後發現,搜索引擎也沒有扔東西,但它在beautifulsoup的問題跟蹤引用:https://bugs.launchpad.net/beautifulsoup/+bug/1603299
它與html5lib v 0.9999999
(7九)
"html5lib<=0.9999999"
我升級beautifulsoup4和html5lib,它解決了問題工作回來。
pip install --upgrade beautifulsoup4
pip install --upgrade html5lib
證實這個工作使'sudo pip install spry'正常工作,沒有錯誤2月 – jamescampbell
是的,確認這是解決方案。 – evan912
同樣的問題發生在我身上。我不知道你在做什麼,但是當我嘗試使用pd.read_html()
來讀熊貓中的XML文件時,發生在我身上。
pip install bs4
pip install html5lib
pip install lxml
,並重新啓動你的Python環境,現在,它正在:
問題是由升級所有beautifulsoup4,html5lib和LXML,如固定。
這與上游包html5lib一個問題:https://bugs.launchpad.net/beautifulsoup/+bug/1603299 要修復,強制降級到舊版本:
PIP安裝--upgrade html5lib == 1.0b8
這解決了類似的錯誤在kaggle- cli太 – Jim
(在W7上)。不幸的是我嘗試了降級和升級。我還嘗試使用Python 2.7來安裝虛擬環境。沒有工作到目前爲止,基本上我堅持使用beautifulsoup庫 –
我只是克服了這個錯誤,只是檢查Pycharm在我的虛擬環境中使用了錯誤的解釋器。事實上,在python idle和Powershell中,我沒有遇到這樣的錯誤 –