Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wengzilla opened this issue Jul 15, 2016 · 6 comments
Closed

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

wengzilla opened this issue Jul 15, 2016 · 6 comments

Comments

@wengzilla
Copy link

wengzilla commented Jul 15, 2016

Subject of the issue

I am unable to download the course 'build-a-computer' and am receiving this stack trace. Any ideas on how to fix? I've already upgraded all of my scripts/libraries and am not quite sure what to do next.

Traceback (most recent call last):
  File "/usr/local/bin/coursera-dl", line 7, in <module>
    from coursera.coursera_dl import main
  File "/usr/local/lib/python2.7/site-packages/coursera/coursera_dl.py", line 63, in <module>
    import bs4
  File "/usr/local/lib/python2.7/site-packages/bs4/__init__.py", line 30, in <module>
    from .builder import builder_registry, ParserRejectedMarkup
  File "/usr/local/lib/python2.7/site-packages/bs4/builder/__init__.py", line 314, in <module>
    from . import _html5lib
  File "/usr/local/lib/python2.7/site-packages/bs4/builder/_html5lib.py", line 70, in <module>
    class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
AttributeError: 'module' object has no attribute '_base'

Your environment

  • Operating System (name/version): Mac OSX 10.11.5
  • Python version: 2.7.11
  • coursera-dl version: 0.6.1

Steps to reproduce

coursera-dl -u MY_USERNAME -p MY_PASSWORD build-a-computer

Course

https://www.coursera.org/learn/build-a-computer

@balta2ar
Copy link
Member

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

@neokito
Copy link

neokito commented Jul 18, 2016

Same error,

screenshot 2016-07-18 13 23 46

screenshot 2016-07-18 13 23 32

i make a downgrade
screenshot 2016-07-18 13 27 25

Lol xD, Now I have the error of cookies (ref: #547)
screenshot 2016-07-18 13 28 09

reubano added a commit to nerevu/riko that referenced this issue Jul 18, 2016
reubano added a commit to nerevu/riko that referenced this issue Jul 19, 2016
@balta2ar
Copy link
Member

This should be fixed in 0.7.0. Besides, we don't use html5lib anymore.

hufman added a commit to hufman/vgmdb that referenced this issue Mar 19, 2017
I don't want to upgrade BS4 at the moment, it breaks some parsing

Taken from coursera-dl/coursera-dl#554
@EvaldoAraujo
Copy link

Isso resolveu meu problema.
sudo pip3 install html5lib==0.9999999
Link: https://bugs.launchpad.net/beautifulsoup/+bug/1603299
:)

@rbrito
Copy link
Member

rbrito commented May 23, 2017

@EvaldoAraujo, você está usando a última versão do coursera-dl? O que ocorre se você remover a html5lib (não lembro se outros pacotes serão removidos)...

Se você conseguir escrever em inglês, isso facilita para o resto do pessoal que mantém o programa, já que nós temos um que é colombiano, um russo e um brasileiro (eu). Mas, se você não souber, tudo bem também.

@EvaldoAraujo
Copy link

rbrito, não escrevo em inglês, outros pacotes dependem dessa lib, eu atualizei essa lib para poder usar o Spyder3 python que usa ela. flw

@coursera-dl coursera-dl locked and limited conversation to collaborators May 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants