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

html5lib version issue #89

Closed
danaas18 opened this issue Jul 27, 2016 · 4 comments
Closed

html5lib version issue #89

danaas18 opened this issue Jul 27, 2016 · 4 comments

Comments

@danaas18
Copy link

In attempting to use pyiso to get CAISO data, I receive the error below. Using Python 3.5 on ubuntu. It appears that _base.py should now be just base.py

https://groups.google.com/forum/#!topic/beautifulsoup/JO_9ufJB4UM

`---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
in ()
----> 1 caiso = client_factory('CAISO')

/home/dan/anaconda3/lib/python3.5/site-packages/pyiso/init.py in client_factory(client_name, **kwargs)
67 # load
68 try:
---> 69 mod = imp.load_module(module_name, fp, pathname, description)
70 finally:
71 # Since we may exit via an exception, close fp explicitly.

/home/dan/anaconda3/lib/python3.5/imp.py in load_module(name, file, filename, details)
232 raise ValueError(msg)
233 elif type_ == PY_SOURCE:
--> 234 return load_source(name, filename, file)
235 elif type_ == PY_COMPILED:
236 return load_compiled(name, filename, file)

/home/dan/anaconda3/lib/python3.5/imp.py in load_source(name, pathname, file)
170 module = _exec(spec, sys.modules[name])
171 else:
--> 172 module = _load(spec)
173 # To allow reloading to potentially work, use a non-hacked loader which
174 # won't rely on a now-closed file object.

/home/dan/anaconda3/lib/python3.5/importlib/_bootstrap.py in _load(spec)

/home/dan/anaconda3/lib/python3.5/importlib/_bootstrap.py in _load_unlocked(spec)

/home/dan/anaconda3/lib/python3.5/importlib/_bootstrap_external.py in exec_module(self, module)

/home/dan/anaconda3/lib/python3.5/importlib/_bootstrap.py in _call_with_frames_removed(f, _args, *_kwds)

/home/dan/anaconda3/lib/python3.5/site-packages/pyiso/caiso.py in ()
4 import copy
5 import re
----> 6 from bs4 import BeautifulSoup
7 from io import BytesIO, StringIO
8 import pandas as pd

/home/dan/anaconda3/lib/python3.5/site-packages/bs4/init.py in ()
28 import warnings
29
---> 30 from .builder import builder_registry, ParserRejectedMarkup
31 from .dammit import UnicodeDammit
32 from .element import (

/home/dan/anaconda3/lib/python3.5/site-packages/bs4/builder/init.py in ()
312 register_treebuilders_from(_htmlparser)
313 try:
--> 314 from . import _html5lib
315 register_treebuilders_from(_html5lib)
316 except ImportError:

/home/dan/anaconda3/lib/python3.5/site-packages/bs4/builder/_html5lib.py in ()
68
69
---> 70 class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
71
72 def init(self, soup, namespaceHTMLElements):

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

`

@aschn
Copy link
Contributor

aschn commented Jul 27, 2016

Nice catch! Does the branch in PR #88 fix the problem for you?

@aschn
Copy link
Contributor

aschn commented Jul 28, 2016

That PR is now merged and available on pypi as version 0.3.9. Is that helping your situation?

@danaas18
Copy link
Author

It did. Thanks!

@MadDenker
Copy link

Very interesting, I had a similar issue with spyder and Ipython recently. BeautifulSoup caused a lot of trouble with this dependency issue!

spyder-ide/spyder#3287 (comment)

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

3 participants