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

AttributeError: 'module' object has no attribute '_base' #2

Open
sprutner opened this issue Feb 21, 2018 · 1 comment
Open

AttributeError: 'module' object has no attribute '_base' #2

sprutner opened this issue Feb 21, 2018 · 1 comment

Comments

@sprutner
Copy link

Hey there,

I followed your instructions exactly, but when I try to run

./manage.py search --help
or any ./manage.py search

I run into

$ ./manage.py search
Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/Users/srutner/skyscraper/lib/python2.7/site-packages/django/core/management/__init__.py", line 453, in execute_from_command_line
    utility.execute()
  File "/Users/srutner/skyscraper/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/srutner/skyscraper/lib/python2.7/site-packages/django/core/management/__init__.py", line 272, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/Users/srutner/skyscraper/lib/python2.7/site-packages/django/core/management/__init__.py", line 77, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/Users/srutner/skyscraper/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/Users/srutner/skyscraper/skyscanner_scraper/management/commands/search.py", line 16, in <module>
    from skyscanner_scraper.client import SkyscannerClient
  File "/Users/srutner/skyscraper/skyscanner_scraper/client.py", line 13, in <module>
    from bs4 import BeautifulSoup
  File "/Users/srutner/skyscraper/lib/python2.7/site-packages/bs4/__init__.py", line 29, in <module>
    from .builder import builder_registry
  File "/Users/srutner/skyscraper/lib/python2.7/site-packages/bs4/builder/__init__.py", line 306, in <module>
    from . import _html5lib
  File "/Users/srutner/skyscraper/lib/python2.7/site-packages/bs4/builder/_html5lib.py", line 57, in <module>
    class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
AttributeError: 'module' object has no attribute '_base'

Any idea why this is occurring?

@vandah
Copy link

vandah commented Feb 23, 2018

this can be fixed by replacing all occurences of '_base' by 'base' in the specified file (skyscraper/lib/python2.7/site-packages/bs4/builder/_html5lib.py)

it seems to be a problem with different package so for a more permanent solution try to solve this elsewhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants