beautifulsoup, html5lib: module object has no attribute _base

前端 未结 8 2101
逝去的感伤
逝去的感伤 2020-12-04 18:57

When I updated my packages I have this new error:

class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
AttributeError: \'module\' object ha         


        
相关标签:
8条回答
  • 2020-12-04 19:38

    This command solved the problem for me:

     sudo pip install html5lib==0.9999999
    
    0 讨论(0)
  • 2020-12-04 19:42

    The downgrade to html5lib 1.0b8 in @Bhavuk answer works but courses a version issue with bleach.

    The solution for me was with a change of version of bleach to be compatible with the new version of html5lib

    pip install --upgrade bs4
    pip install --upgrade bleach==1.4.2
    pip install --upgrade html5lib==1.0b8
    

    Python version 3.5

    0 讨论(0)
提交回复
热议问题