0

I'm getting this error. Is it a bug or is it a code error? What does it mean?

Traceback (most recent call last):
 File "isc.py", line 8, in <module>
 import requests, os, sys, bs4
 File "/opt/virtualenvs/python3/lib/python3.8/site-packages/bs4/__init__.py", line 30, in <module>
 from .builder import builder_registry, ParserRejectedMarkup
 File "/opt/virtualenvs/python3/lib/python3.8/site-packages/bs4/builder/__init__.py", line 314, in <module>
 from . import _html5lib
 File "/opt/virtualenvs/python3/lib/python3.8/site-packages/bs4/builder/_html5lib.py", line 70, in <module>
 class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
AttributeError: module 'html5lib.treebuilders' has no attribute '_base'

(i upgraded html5lib bs4 and requests)

asked Dec 17, 2020 at 14:50
4
  • Please post your code, we don't have context Commented Dec 17, 2020 at 14:53
  • Try to upgrade beautifulsoup4 and html5lib Commented Dec 17, 2020 at 14:53
  • I edited github.com/trevorw22/Imgur-Scraper/blob/master/imgurScraper.py (code at pastebin.com/i8UD5Dbf) Commented Dec 17, 2020 at 14:54
  • @干猕猴桃 I actually forgot to upgrade pip (fixed) Commented Dec 17, 2020 at 15:06

1 Answer 1

0

It's an issue related to your html5lib package version try upgrading it.

answered Dec 17, 2020 at 14:59
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.