I realize this bug doesn't impact any version of html5lib officially in
xenial. However, for whatever reason if a user decides to install a
newer version of html5lib (e.g. via pip), bs4 will break as a side
effect and possibly render other programs unusable.
AFAIK it's 'pip install html5lib' (to get html5lib >= 0.99999999) and
then trying to import bs4 by any means that triggers the issue.
gl@nucleus:~$ pip install html5lib
Collecting html5lib
Downloading html5lib-0.999999999-py2.py3-none-any.whl (112kB)
100% |████████████████████████████████| 122kB 2.8MB/s
Collecting six (from html5lib)
Downloading six-1.10.0-py2.py3-none-any.whl
Collecting setuptools>=18.5 (from html5lib)
Downloading setuptools-35.0.2-py2.py3-none-any.whl (390kB)
100% |████████████████████████████████| 399kB 2.0MB/s
Collecting webencodings (from html5lib)
Downloading webencodings-0.5.1-py2.py3-none-any.whl
Collecting appdirs>=1.4.0 (from setuptools>=18.5->html5lib)
Downloading appdirs-1.4.3-py2.py3-none-any.whl
Collecting packaging>=16.8 (from setuptools>=18.5->html5lib)
Downloading packaging-16.8-py2.py3-none-any.whl
Collecting pyparsing (from packaging>=16.8->setuptools>=18.5->html5lib)
Downloading pyparsing-2.2.0-py2.py3-none-any.whl (56kB)
100% |████████████████████████████████| 61kB 4.8MB/s
Installing collected packages: six, appdirs, pyparsing, packaging, setuptools,
webencodings, html5lib
Successfully installed appdirs html5lib-0.999 packaging pyparsing
setuptools-20.7.0 six-1.10.0 webencodings
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
gl@nucleus:~$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import bs4
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/bs4/__init__.py", line 30, in <module>
from .builder import builder_registry, ParserRejectedMarkup
File "/usr/lib/python2.7/dist-packages/bs4/builder/__init__.py", line 314, in
<module>
from . import _html5lib
File "/usr/lib/python2.7/dist-packages/bs4/builder/_html5lib.py", line 70, in
<module>
class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
AttributeError: 'module' object has no attribute '_base'
>>>
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1603299
Title:
Crash with latest html5lib
To manage notifications about this bug go to:
https://bugs.launchpad.net/beautifulsoup/+bug/1603299/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs