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 12-22-2014, 10:17 AM   #1
jammer699669
Junior Member
jammer699669 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Dec 2014
Device: android
Ebook-Convert Import Errors

ImportError: cannot import name Qcolor

is the error I am getting

I am running it on a full server and want to use the EXec command to convert from epub to Mobi
The server is running CentOS6 without a GUI

I have tried to make sure everything is installed etc but the problem comes when it starts doing the Imports

[0] => 1% Converting input to HTML...
[1] => InputFormatPlugin: EPUB Input running
[2] => on /home/spang/public_html/epub/DefiantHeart.epub
[3] => Found HTML cover OEBPS/CoverPage.xhtml
[4] => Parsing all content...
[5] => CSSPageRule selectorText: Unexpected CHAR: u',' [2:6: ,]
[6] => CSSPageRule selectorText: Unexpected CHAR: u',' [2:12: ,]
[7] => CSSPageRule selectorText: Unexpected IDENT: u'div' [2:14: div]
[8] => CSSPageRule selectorText: Unexpected CHAR: u',' [2:17: ,]
[9] => CSSPageRule selectorText: Unexpected IDENT: u'img' [2:19: img]
[10] => 34% Running transforms on ebook...
[11] => Merging user specified metadata...
[12] => Detecting structure...
[13] => Flattening CSS and remapping font sizes...
[14] => Source base font size is 12.00000pt
[15] => Removing fake margins...
[16] => Cleaning up manifest...
[17] => Trimming unused files from manifest...
[18] => Trimming u'OEBPS/CoverPage.xhtml' from manifest
[19] => Creating MOBI Output...
[20] => 67% Running MOBI Output plugin
[21] => Serializing resources...
[22] => Creating MOBI 6 output
[23] => Traceback (most recent call last):
[24] => File "site.py", line 51, in main
[25] => File "site-packages/calibre/ebooks/conversion/cli.py", line 360, in main
[26] => File "site-packages/calibre/ebooks/conversion/plumber.py", line 1195, in run
[27] => File "site-packages/calibre/ebooks/conversion/plugins/mobi_output.py", line 206, in convert
[28] => File "site-packages/calibre/ebooks/conversion/plugins/mobi_output.py", line 216, in write_mobi
[29] => File "site-packages/calibre/ebooks/oeb/transforms/rasterize.py", line 13, in
[30] => ImportError: cannot import name QColor


this is the line from the php file
exec("ebook-convert DefiantHeart.epub DefiantHeart.mobi 2>&1 ",$output);

Last edited by jammer699669; 12-22-2014 at 10:36 AM.
jammer699669 is offline   Reply With Quote
Old 12-22-2014, 10:36 AM   #2
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,367
Karma: 78877538
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
What version of calibre are you using?

Is it installed from the official location (ie http://calibre-ebook.com/download_linux) or from some other repository?

Have you verified that you meet all the requirements listed at http://calibre-ebook.com/download_linux ?
PeterT is offline   Reply With Quote
Advert
Old 12-22-2014, 10:40 AM   #3
jammer699669
Junior Member
jammer699669 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Dec 2014
Device: android
yes I used this one
sudo -v && wget -nv -O- https://raw.githubusercontent.com/ko...x-installer.py | sudo python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()"

the system is up to date , but it is a server and not a regular linux install
jammer699669 is offline   Reply With Quote
Old 12-22-2014, 10:53 AM   #4
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,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The version of glibc or libstdc++ on your server is too old. The minimum requirements for those are listed on the linux download page.
kovidgoyal is offline   Reply With Quote
Old 12-22-2014, 11:15 AM   #5
jammer699669
Junior Member
jammer699669 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Dec 2014
Device: android
is there a work around or an older version that I can use Glib is 2.12
jammer699669 is offline   Reply With Quote
Advert
Old 12-22-2014, 11:59 AM   #6
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)
http://manual.calibre-ebook.com/faq....n-linux-server

You bought into the notion.
eschwartz is offline   Reply With Quote
Old 12-22-2014, 10:11 PM   #7
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,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The linux download page also contains all the information you need to get and install older versions. You'd need version 1.48.
kovidgoyal is offline   Reply With Quote
Old 12-22-2014, 10:25 PM   #8
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)
Kovid, the instructions I linked to still refer to the googlecode download page. Also, maybe it should be updated to "compile a newer version of glibc (>= 2.13)".

Last edited by eschwartz; 12-22-2014 at 10:27 PM.
eschwartz is offline   Reply With Quote
Old 12-22-2014, 11:13 PM   #9
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,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It's actually more complex than that, now (thanks to Qt5). You will need both libc and libstdc++. I'm just going to remove that section.
kovidgoyal is offline   Reply With Quote
Old 12-22-2014, 11:58 PM   #10
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)
The old version was funnier.

Quote:
Note: If you bought into the notion that a real server must run a decade old version of Debian, then you will have to jump through a few hoops. [...]
Anyway, thanks for updating the instructions.
eschwartz is offline   Reply With Quote
Old 12-23-2014, 12:20 AM   #11
jammer699669
Junior Member
jammer699669 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Dec 2014
Device: android
Thanks for the Info Kovid

I looked at all the options for upgrading the OS on the server but it has it's own problems

I will give 1.48 a try
jammer699669 is offline   Reply With Quote
Old 12-23-2014, 02:11 AM   #12
jammer699669
Junior Member
jammer699669 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Dec 2014
Device: android
is there a binary install for that version >? 1.48

I have tried the tar file but it doesn't add it to th path as well it gives me an ImageMagick error
jammer699669 is offline   Reply With Quote
Old 12-23-2014, 02:20 AM   #13
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)
Extract the tarball manually into opt, then run sudo /opt/calibre/calibre_postinstall to setup mimetypes, file associations, linking the binaries to /usr/bin/, adding bash/zsh-completions, etc.

The imagemagick error is probably the same one we have been getting for years, some stupid warning about color profiles in resource images. Does it still run? What is the error?
eschwartz is offline   Reply With Quote
Old 12-23-2014, 07:48 AM   #14
jammer699669
Junior Member
jammer699669 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Dec 2014
Device: android
RuntimeError: Failed to load ImageMagick: libXdmcp.so.6: cannot open shared object file: No such file or directory

I did run
/opt/calibre/calibre_postinstall
it gave two warnings , prob because am running on a headless server
the error above happens when I run this command
I am in the right directory etc

As well I have ImageMagick installed on the server

ebook-convert DefiantHeart.epub DefiantHeart.mobi --mobi-toc-at-start
jammer699669 is offline   Reply With Quote
Old 12-23-2014, 08:06 AM   #15
jammer699669
Junior Member
jammer699669 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Dec 2014
Device: android
OK Finally got it to work

had to install libXdmcp


Thanks guys for all the help
jammer699669 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] Feature Idea - Auto convert on import jphphotography Calibre 6 11-04-2012 09:17 PM
Epub import and convert gucky Calibre 1 01-09-2011 04:27 AM
Import Failed? Can't convert JPG PDFs? Tef61 Kindle Formats 6 09-20-2010 01:46 PM
Automatically convert file to EPUB upon import into library astrodad Calibre 6 07-23-2010 12:22 PM
Import Failed Errors connecting to Calibre on Touch jonsarik Calibre 26 09-30-2009 12:50 AM


All times are GMT -4. The time now is 06:18 AM.


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