beautifulsoup, html5lib: module object has no attribute _base
When I updated my packages I have this new error:
class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
AttributeError: 'module' object has no attribute '_base'
I tried to update beautifulsoup
, with no more result. How can I fix that?
I upgraded beautifulsoup4 and html5lib and it resolved the issue.
pip install --upgrade beautifulsoup4
pip install --upgrade html5lib
This is an issue with upstream package html5lib: https://bugs.launchpad.net/beautifulsoup/+bug/1603299 To fix, force downgrade to an older version:
pip install --upgrade html5lib==1.0b8
edit nov, 2017: it seems this doesn't work any more
Finally found out, a search engine didn't throw anything but it's referenced on beautifulsoup's issue tracker: https://bugs.launchpad.net/beautifulsoup/+bug/1603299
it works back with html5lib v0.9999999
(7 nines)
"html5lib<=0.9999999"