floydwch / kaggle-cli

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

'html5lib.treebuilders' has no attribute '_base' on submission #38

Closed IoDmitri closed 7 years ago

IoDmitri commented 7 years ago

While trying to make a submission by running `submit -m "some notes", I get the following printout.

Traceback (most recent call last):
  File "/usr/local/bin/kg", line 9, in <module>
    load_entry_point('kaggle-cli==0.10.0', 'console_scripts', 'kg')()
  File "/usr/local/lib/python3.5/dist-packages/kaggle_cli/main.py", line 21, in main
    return app.run(argv)
  File "/usr/local/lib/python3.5/dist-packages/cliff/app.py", line 279, in run
    result = self.run_subcommand(remainder)
  File "/usr/local/lib/python3.5/dist-packages/cliff/app.py", line 363, in run_subcommand
    subcommand = self.command_manager.find_command(argv)
  File "/usr/local/lib/python3.5/dist-packages/cliff/commandmanager.py", line 83, in find_command
    cmd_factory = cmd_ep.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2235, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.5/dist-packages/kaggle_cli/submit.py", line 3, in <module>
    from . import common
  File "/usr/local/lib/python3.5/dist-packages/kaggle_cli/common.py", line 3, in <module>
    from mechanicalsoup import Browser
  File "/usr/local/lib/python3.5/dist-packages/mechanicalsoup/__init__.py", line 2, in <module>
    from .browser import Browser
  File "/usr/local/lib/python3.5/dist-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'
greenyouse commented 7 years ago

This might be a problem with html5lib. I used the first suggested fix from SO and it solved the problem for me.

I think this is the relevant problem from html5lib.

floydwch commented 7 years ago

@greenyouse lol, thanks for your find, I guess it won't occur if install via pip install -U kaggle-cli.

seansio1995 commented 7 years ago

Thanks, it helps