stylizer.py does not work with lxml 3.0

Bug #1067942 reported by Doug Newgard
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
calibre
Invalid
Undecided
Unassigned

Bug Description

Converting to a book to .mobi, I get an error with this traceback:
Traceback (most recent call last):
  File "/usr/bin/calibre-parallel", line 20, in <module>
    sys.exit(main())
  File "/usr/lib/calibre/calibre/utils/ipc/worker.py", line 186, in main
    result = func(*args, **kwargs)
  File "/usr/lib/calibre/calibre/gui2/convert/gui_conversion.py", line 31, in gui_convert_override
    override_input_metadata=True)
  File "/usr/lib/calibre/calibre/gui2/convert/gui_conversion.py", line 25, in gui_convert
    plumber.run()
  File "/usr/lib/calibre/calibre/ebooks/conversion/plumber.py", line 1040, in run
    from calibre.ebooks.oeb.transforms.flatcss import CSSFlattener
  File "/usr/lib/calibre/calibre/ebooks/oeb/transforms/flatcss.py", line 19, in <module>
    from calibre.ebooks.oeb.stylizer import Stylizer
  File "/usr/lib/calibre/calibre/ebooks/oeb/stylizer.py", line 23, in <module>
    from lxml.cssselect import css_to_xpath, ExpressionError, SelectorSyntaxError
ImportError: cannot import name css_to_xpath

Looking at cssselect.py from lxml, it was converted to a wrapper in 3.0,
the functionality extracted to a standalone project: http://packages.python.org/cssselect/

The wrapper doesn't seem to have the same functionality as the original.

Doug Newgard (scimmia22)
description: updated
description: updated
Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1067942

I do not provide support for people using distro provided packages. If you are using a distro provided package, uninstall it and install the official calibre binary from http://calibre-ebook.com/download_linux and if you can reproduce the bug with that, re-open the ticket.

 status invalid

Changed in calibre:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.