Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 03-16-2016, 07:11 PM   #1
rlpowell
Junior Member
rlpowell began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2016
Device: Android
XHTML to MOBI: "mportError: cannot import name QColor"

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*
rlpowell is offline   Reply With Quote
Old 03-16-2016, 10:13 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,252
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Uninstall your distro calibre package and install the official binary from https://calibre-ebook.com/download_linux
kovidgoyal is offline   Reply With Quote
Advert
Old 03-17-2016, 12:40 PM   #3
rlpowell
Junior Member
rlpowell began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2016
Device: Android
Quote:
Originally Posted by kovidgoyal View Post
Uninstall your distro calibre package and install the official binary from https://calibre-ebook.com/download_linux
... That worked. That's terrible.

I'll point this out to the Fedora package maintainer. Thanks.
rlpowell is offline   Reply With Quote
Old 03-17-2016, 02:42 PM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,942
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by rlpowell View Post
... That worked. That's terrible.

I'll point this out to the Fedora package maintainer. Thanks.
They (most distros) Know
They don't care or really think they know better
theducks is offline   Reply With Quote
Old 03-17-2016, 03:22 PM   #5
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
I think it is pretty funny they still ship a dummy calibre-mount-helper.

Also IIRC they are the pushy ones who wanted appdata files in the first place (and bothered app developers to include them in the upstream sources). But they ship their own replacement for calibre's appdata.xml
eschwartz is offline   Reply With Quote
Advert
Old 09-04-2016, 12:38 AM   #6
rlpowell
Junior Member
rlpowell began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2016
Device: Android
;_;

After literally years, figured this out:

There were random old crappy *system-level* libs in /usr/local/lib, and they were *in use*:

rlpowell@vrici> sudo ldd /usr/bin/* | grep /usr/local/lib | awk '{ print $3 }' | sort | uniq -c
[sudo] password for rlpowell:
ldd: /usr/bin/miniterm-2.7.py: No such file or directory
ldd: warning: you do not have execution permission for `/usr/bin/mono-sgen-gdb.py'
2 /usr/local/lib/libQtCore.so.4
1 /usr/local/lib/libQtGui.so.4
82 /usr/local/lib/libfontconfig.so.1
101 /usr/local/lib/libfreetype.so.6
5 /usr/local/lib/libguile-2.0.so.22

Removing that crap plus a re-install cleared the problem right up.

;___; I can't believe it was something so dumb. Sorry about that!
rlpowell is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
XHTML: Attributes "start" at <ol> and "value" at <li> mmat1 ePub 9 02-23-2012 11:03 AM
epub "padding left" to mobi "block quote" conversion issue 1611mac Conversion 3 01-11-2012 02:10 PM
ERROR ITMS-9000: "Unable to analyse: cover.xhtml" at Book irenelucia ePub 0 01-04-2012 12:18 PM
Graphical layout vs. semantically "correct" XHTML code Iznogood Workshop 16 04-05-2011 08:14 AM
Importing "big" XHTML files in Sigil paulpeer Sigil 8 03-19-2010 05:00 AM


All times are GMT -4. The time now is 03:24 AM.


MobileRead.com is a privately owned, operated and funded community.