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' #12

Closed
hasanzuav opened this issue Mar 26, 2017 · 1 comment
Closed

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

hasanzuav opened this issue Mar 26, 2017 · 1 comment

Comments

@hasanzuav
Copy link

I wrote the following script:

from investopedia import *
client = Account("emailaddress","password") #replaced with my info

status = client.get_portfolio_status()
print status.account_val
print status.buying_power
print status.cash
print status.annual_return

I was able to install all the modules by running py -2.7 setup.py install for each dependency.

I am receiving the following error:

Traceback (most recent call last):
File "C:/Users/Z/PycharmProjects/investopedia/test.py", line 1, in <module>
    from investopedia import *
  File "C:\Users\Z\PycharmProjects\investopedia\investopedia.py", line 4, in <module>
    from bs4 import BeautifulSoup
  File "C:\Users\Z\AppData\Local\Enthought\Canopy\User\lib\site-packages\bs4\__init__.py", line 29, in <module>
    from .builder import builder_registry
  File "C:\Users\Z\AppData\Local\Enthought\Canopy\User\lib\site-packages\bs4\builder\__init__.py", line 297, in <module>
    from . import _html5lib
  File "C:\Users\Z\AppData\Local\Enthought\Canopy\User\lib\site-packages\bs4\builder\_html5lib.py", line 57, in <module>
    class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
AttributeError: 'module' object has no attribute '_base'

Do you know how to resolve this?

@hasanzuav
Copy link
Author

Solved this by using

pip2.7 install --upgrade beautifulsoup4
pip2.7 install --upgrade html5lib

Works beautifully now.

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

1 participant