Quantcast
Channel: MobileRead Forums - Reading and Management
Viewing all articles
Browse latest Browse all 23789

XHTML to MOBI: "mportError: cannot import name QColor"

$
0
0
Basic example of the problem is below. Conversion to epub works fine, but mobi fails. I've tried everything I can find about this online:

Code:

rlpowell@vrici> ebook-convert /home/rlpowell/lojban/cll/build/xhtml_nochunks.zip /home/rlpowell/lojban/cll/build/cll.epub 2>&1 | tail -n 20
        Detected chapter: 1. The Hills Are Alive With The Sounds Of Lojban
        Detected chapter: Chapter*1.*The Hills Are Alive With The Sounds Of
        Detected chapter: Chapter*1.*The Hills Are Alive With The Sounds Of
Maximum TOC links reached, stopping.
Auto generated TOC with 53 entries.
Flattening CSS and remapping font sizes...
Source base font size is 9.00000pt
Removing fake margins...
Cleaning up manifest...
Trimming unused files from manifest...
Creating EPUB Output...
67% Running EPUB Output plugin
Splitting markup on page breaks and flow limits, if any...
        Looking for large trees in index.html...
        No large trees found
        Split into 19 parts
Generating default cover
Failed to generate default cover
EPUB output written to /home/rlpowell/lojban/cll/build/cll.epub
Output saved to  /home/rlpowell/lojban/cll/build/cll.epub




rlpowell@vrici> ebook-convert /home/rlpowell/lojban/cll/build/xhtml_nochunks.zip /home/rlpowell/lojban/cll/build/cll.mobi 2>&1 | tail -n 20
Cleaning up manifest...
Trimming unused files from manifest...
Creating MOBI Output...
67% Running MOBI Output plugin
Serializing resources...
Creating MOBI 6 output
Traceback (most recent call last):
  File "/bin/ebook-convert", line 20, in <module>
    sys.exit(main())
  File "/usr/lib64/calibre/calibre/ebooks/conversion/cli.py", line 360, in main
    plumber.run()
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plumber.py", line 1198, in run
    self.opts, self.log)
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plugins/mobi_output.py", line 207, in convert
    self.write_mobi(input_plugin, output_path, kf8, resources)
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plugins/mobi_output.py", line 217, in write_mobi
    from calibre.ebooks.oeb.transforms.rasterize import SVGRasterizer, Unavailable
  File "/usr/lib64/calibre/calibre/ebooks/oeb/transforms/rasterize.py", line 13, in <module>
    from PyQt5.Qt import (
ImportError: cannot import name QColor

The source file is http://vrici.lojban.org/~rlpowell/me...read_forum.zip and the full output is http://vrici.lojban.org/~rlpowell/me...read_forum.out

When I've researched this online, people have talked about various package problems, so here's some package info that may help: http://paste.fedoraproject.org/341266/58169624/ ; that's the output of dnf list installed '*poppl*' '*qt*' '*libc*' '*libstdc*'

Note that ebook-convert is explicitely using python2, so python3 stuff can be ignored.

The libstdc++ version looks scary, but:

rlpowell@vrici> ls -l /lib64/libstdc++.so.6*
lrwxrwxrwx. 1 root root 19 Dec 8 09:45 /lib64/libstdc++.so.6 -> libstdc++.so.6.0.21*
-rwxr-xr-x. 1 root root 1566600 Dec 8 09:49 /lib64/libstdc++.so.6.0.21*

Viewing all articles
Browse latest Browse all 23789

Trending Articles