Public bug reported:

On Maverick, installing python-lxml and python-html5lib together results
in tracebacks when you try to import html5parser from lxml.

$ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from lxml.html import html5parser
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/dist-packages/lxml/html/html5parser.py", line 170, 
in <module>
    html_parser = HTMLParser()
  File "/usr/lib/python2.6/dist-packages/lxml/html/html5parser.py", line 22, in 
__init__
    _HTMLParser.__init__(self, strict=strict, tree=TreeBuilder)
  File "/usr/lib/pymodules/python2.6/html5lib/html5parser.py", line 68, in 
__init__
    self.tree = tree(namespaceHTMLElements)
TypeError: __init__() takes exactly 1 argument (2 given)


$ dpkg -s python-lxml python-html5lib
Package: python-lxml
Status: install ok installed
Priority: optional
Section: python
Installed-Size: 1712
Maintainer: Ubuntu Developers <[email protected]>
Architecture: i386
Source: lxml
Version: 2.2.6-1
Replaces: python2.3-lxml, python2.4-lxml
Provides: python2.6-lxml
Depends: python (<< 2.7), python (>= 2.6), python-central (>= 0.6.11), libc6 
(>= 2.3.6-6~), libxml2 (>= 2.7.4), libxslt1.1 (>= 1.1.18), zlib1g (>= 1:1.1.4)
Suggests: python-lxml-dbg
Conflicts: python2.3-lxml, python2.4-lxml
Description: pythonic binding for the libxml2 and libxslt libraries
 lxml is a new Python binding for libxml2 and libxslt, completely
 independent from these existing Python bindings. Its aim:
 .
   * Pythonic API.
   * Documented.
   * Use Python unicode strings in API.
   * Safe (no segfaults).
   * No manual memory management!
 .
 lxml aims to provide a Pythonic API by following as much as possible
 the ElementTree API, trying to avoid having to invent too many new APIs,
 or you having to learn new things -- XML is complicated enough.
Original-Maintainer: Matthias Klose <[email protected]>
Python-Version: 2.6

Package: python-html5lib
Status: install ok installed
Priority: optional
Section: python
Installed-Size: 632
Maintainer: Ubuntu Developers <[email protected]>
Architecture: all
Source: html5lib
Version: 0.90-1
Depends: python (>= 2.5), python-support (>= 0.90.0)
Suggests: python-beautifulsoup, python-chardet, python-lxml | 
python-4suite-xml, python-genshi
Description: HTML parser/tokenizer based on the WHATWG HTML5 specification
 html5lib is a pure-python library for parsing HTML. It is designed to
 conform to the HTML 5 specification, which has formalized the error handling
 algorithms of popular web browsers.
Original-Maintainer: Debian Python Modules Team 
<[email protected]>
Homepage: http://code.google.com/p/html5lib/

** Affects: lxml (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/690968

Title:
  Python lxml incompatible with html5lib

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to