floydwch / kaggle-cli

(Deprecated, use https://github.com/Kaggle/kaggle-api instead) An unofficial Kaggle command line tool.
MIT License
674 stars 92 forks source link

AttributeError: module 'html5lib.treebuilders' has no attribute '_base' #51

Closed queirozfcom closed 6 years ago

queirozfcom commented 6 years ago

I got this when trying to submit anything after a clean install (python 3)

kaggle-cli==0.12.8 html5lib==0.999999999

DUMP:

Traceback (most recent call last):
  File "/home/felipe/tf-venv3/bin/kg", line 11, in <module>
    sys.exit(main())
  File "/home/felipe/tf-venv3/lib/python3.5/site-packages/kaggle_cli/main.py", line 21, in main
    return app.run(argv)
  File "/home/felipe/tf-venv3/lib/python3.5/site-packages/cliff/app.py", line 279, in run
    result = self.run_subcommand(remainder)
  File "/home/felipe/tf-venv3/lib/python3.5/site-packages/cliff/app.py", line 363, in run_subcommand
    subcommand = self.command_manager.find_command(argv)
  File "/home/felipe/tf-venv3/lib/python3.5/site-packages/cliff/commandmanager.py", line 83, in find_command
    cmd_factory = cmd_ep.resolve()
  File "/home/felipe/tf-venv3/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2415, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/felipe/tf-venv3/lib/python3.5/site-packages/kaggle_cli/submit.py", line 8, in <module>
    from . import common
  File "/home/felipe/tf-venv3/lib/python3.5/site-packages/kaggle_cli/common.py", line 5, in <module>
    from mechanicalsoup import Browser
  File "/home/felipe/tf-venv3/lib/python3.5/site-packages/mechanicalsoup/__init__.py", line 2, in <module>
    from .browser import Browser
  File "/home/felipe/tf-venv3/lib/python3.5/site-packages/mechanicalsoup/browser.py", line 3, in <module>
    import bs4
  File "/usr/lib/python3/dist-packages/bs4/__init__.py", line 30, in <module>
    from .builder import builder_registry, ParserRejectedMarkup
  File "/usr/lib/python3/dist-packages/bs4/builder/__init__.py", line 314, in <module>
    from . import _html5lib
  File "/usr/lib/python3/dist-packages/bs4/builder/_html5lib.py", line 70, in <module>
    class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
AttributeError: module 'html5lib.treebuilders' has no attribute '_base'
floydwch commented 6 years ago

Try to rm ~/.kaggle-cli/browser.pickle.

queirozfcom commented 6 years ago

I have no such directory:

$ ls -ld ~/.k*
drwxrwxr-x 3 felipe felipe 4096 Jun 27 00:35 /home/felipe/.keras
queirozfcom commented 6 years ago

Well, I reinstalled the libs and the problem went away. I'll close this.