janeczku / calibre-web

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
GNU General Public License v3.0
12.75k stars 1.33k forks source link

Kindlegen conversation error #64

Closed oguzkilcan closed 8 years ago

oguzkilcan commented 8 years ago

kindlegen sometimes fails while converting ebooks but in calibre web "Book successfully send to xxx@kindle.com" message is shown and an e-mail is sent without an attachment.

ouz@ns333076:~/cw/calibre-web/vendor$ sudo ./kindlegen /home/ouz/kendal2/library/Joe\ Abercrombie/Sharp\ Ends_\ Stories\ from\ the\ World\ of\ The\ First\ Law\ \(4\)/Sharp\ Ends_\ Stories\ from\ the\ World\ of\ The\ -\ Joe\ Abercrombie.epub

*************************************************************
 Amazon kindlegen(Linux) V2.9 build 1028-0897292 
 A command line e-book compiler 
 Copyright Amazon.com and its Affiliates 2014 
*************************************************************

Info(prcgen):I1047: Added metadata dc:Title        "Sharp Ends: Stories from the World of The First Law"
Info(prcgen):I1047: Added metadata dc:Date         "2016-04-25T22:00:00+00:00"
Info(prcgen):I1047: Added metadata dc:Creator      "Joe Abercrombie"
Info(prcgen):I1047: Added metadata dc:Publisher    "Orion"
Info(prcgen):I1047: Added metadata dc:Contributor  "calibre (2.55.0) [http://calibre-ebook.com]"
Info(prcgen):I1047: Added metadata dc:Rights       "All rights reserved"
Info(prcgen):I1047: Added metadata dc:Description  "The Union army may be full of bastards, but there's only one who thinks he can save the day single-handed when the Gurkish come calling: the incomparable Colonel Sand dan Glokta. Curnden Craw and his dozen are out to recover a mysterious item from beyond the Crinna. Only one small 
Info(cssparser):I10004: @rules other than @import, @charset and @font-face are not supported.
Info(prcgen):I1052: Kindle support cover images but does not support cover HTML. Hence using the cover image specified and suppressing cover HTML in content.     URL: /tmp/mobi-Achwwt/titlepage.xhtml
Info(prcgen):I1002: Parsing files  0000034
Warning(prcfile):W14028: Following file does not exist :   styles/XXXXXXXXXXXXXXXX
Info(cssparser):I10006: Invalid syntax for url(), ignoring the URI. "/tmp/mobi-Achwwt/page_styles.css"
Info(prcgen):I1015: Building PRC file
Info(prcgen):I1006: Resolving hyperlinks
Warning(prcgen):W14001: Hyperlink not resolved:  /tmp/mobi-Achwwt/text/kindle:embed:0002?mime=image/jpg
Warning(prcgen):W14001: Hyperlink not resolved:  /tmp/mobi-Achwwt/text/part0000.html#Sharp-Ends-epub
Warning(prcgen):W14001: Hyperlink not resolved:  /tmp/mobi-Achwwt/text/part0001.html#Sharp-Ends-epub
Warning(prcgen):W14001: Hyperlink not resolved:  /tmp/mobi-Achwwt/text/part0003.html#Sharp-Ends-epub
Warning(prcgen):W14001: Hyperlink not resolved:  /tmp/mobi-Achwwt/text/part0005.html#Sharp-Ends-epub
Warning(prcgen):W14001: Hyperlink not resolved:  /tmp/mobi-Achwwt/text/part0007.html#Sharp-Ends-epub
Warning(prcgen):W14001: Hyperlink not resolved:  /tmp/mobi-Achwwt/text/part0009.html#Sharp-Ends-epub
Warning(prcgen):W14001: Hyperlink not resolved:  /tmp/mobi-Achwwt/text/part0011.html#Sharp-Ends-epub
Warning(prcgen):W14001: Hyperlink not resolved:  /tmp/mobi-Achwwt/text/part0013.html#Sharp-Ends-epub
Warning(prcgen):W14001: Hyperlink not resolved:  /tmp/mobi-Achwwt/text/part0015.html#Sharp-Ends-epub
Warning(prcgen):W14001: Hyperlink not resolved:  /tmp/mobi-Achwwt/text/part0017.html#Sharp-Ends-epub
Warning(prcgen):W14001: Hyperlink not resolved:  /tmp/mobi-Achwwt/text/part0019.html#Sharp-Ends-epub
Warning(prcgen):W14001: Hyperlink not resolved:  /tmp/mobi-Achwwt/text/part0021.html#Sharp-Ends-epub
Warning(prcgen):W14001: Hyperlink not resolved:  /tmp/mobi-Achwwt/text/part0023.html#Sharp-Ends-epub
Warning(prcgen):W14001: Hyperlink not resolved:  /tmp/mobi-Achwwt/text/part0027.html#Sharp-Ends-epub
Warning(prcgen):W14001: Hyperlink not resolved:  /tmp/mobi-Achwwt/text/part0029.html#Sharp-Ends-epub
Warning(prcgen):W14001: Hyperlink not resolved:  /tmp/mobi-Achwwt/text/part0031.html#Sharp-Ends-epub
Warning(prcgen):W14001: Hyperlink not resolved:  /tmp/mobi-Achwwt/text/part0032.html#Sharp-Ends-epub
Warning(prcgen):W14001: Hyperlink not resolved:  /tmp/mobi-Achwwt/text/part0033.html#Sharp-Ends-epub
Warning(prcgen):W14002: Some hyperlinks could not be resolved.
Info(prcgen):I1049: Building table of content     URL: /tmp/mobi-Achwwt/toc.ncx
Error(prcgen):E24010: Hyperlink not resolved in toc (One possible reason can be that the link points to a tag with style display:none):/tmp/mobi-Achwwt/text/part0000.html#Sharp-Ends-epub
Error(prcgen):E24001: The table of content could not be built.
Info(prcgen):I1016: Building enhanced PRC file
Info(prcgen):I1007: Resolving mediaidlinks
Info(prcgen):I1011: Writing mediaidlinks
Info(prcgen):I1009: Resolving guide items
Info(pagemap):I8000: No Page map found in the book
Info(prcgen):I1045: Computing UNICODE ranges used in the book
Info(prcgen):I1046: Found UNICODE range: Basic Latin [20..7E]
Info(prcgen):I1046: Found UNICODE range: General Punctuation - Windows 1252 [2018..201A]
Info(prcgen):I1046: Found UNICODE range: Latin-1 Supplement [A0..FF]
Info(prcgen):I1017: Building PRC file, record count:   0000182
Info(prcgen):I1039: Final stats - text compressed to (in % of original size):  52.49%
Info(prcgen):I1040: The document identifier is: "Sharp_Ends_S-_The_First_Law"
Info(prcgen):I1041: The file format version is V8
Info(prcgen):I1031: Saving PRC file
Info(prcgen):I1032: PRC built successfully
Info(prcgen):I1038: MOBI file could not be generated because of errors!

`

janeczku commented 8 years ago

Fixed in PR #65

adocampo commented 6 years ago

Sorry for necrobump, the error just appeared on my calibre-web instance.

There was an error sending this book: Kindlegen failed with Error E24001. Message: The table of content could not be built. On the logs I can see

[2018-02-13 21:36:38,038] {/calibre-web/app/cps/helper.py:111} INFO - Error(prcgen):E24010: Hyperlink not resolved in toc (One possible reason can be that the link points to a tag with style display:non
e):/tmp/mobi-kFupAh/OEBPS/Text/Sec01.xhtml#sigil_toc_id_1
[2018-02-13 21:36:38,038] {/calibre-web/app/cps/helper.py:110} INFO - make_mobi: Kindlegen failed with Error E24001. Message: The table of content could not be built.M
[2018-02-13 21:36:38,038] {/calibre-web/app/cps/helper.py:111} INFO - Error(prcgen):E24001: The table of content could not be built.
[2018-02-13 21:36:38,972] {/calibre-web/app/cps/helper.py:125} INFO - make_mobi: kindlegen failed with error while converting book
OzzieIsaacs commented 6 years ago

It‘s not a problem of Calibre-web. The kindlegen program can't convert the book, because of some issues with the book itself. Sigil (https://github.com/Sigil-Ebook/Sigil) could help to repair the book.

adocampo commented 6 years ago

I didn't knew about Sigil, thanks, but calibre (desktop) can convert the epub just fine... I guess calibre isn't using kindlegen, because 1) it converts the epub without any error, and 2) the converted MOBIs are quite smaller than the epubs converted with calibre-web. (for example, a 700KB epub weighs ~650KB when converted to MOBI with calibre and 2,5MB when converted with calibre-web). I'm very happy with calibre-web, so I can live converting some epub from time to time with calibre, but have you considered to see which method is using calibre to covert those epubs more efficiently and adapt it to calibre-web?