Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 01:27 PM   #1
Arisia
Junior Member
Arisia began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Nov 2024
Device: Moon+ on Android
Viewer fails on some ePub files

Ubuntu 22.04 with latest updates and patches
Calibre 8.9.0

Some (not all) ePub files in my library are producing the following errors when opened with E-Book Viewer:

Failed to open book at /media/<elided>/eBooks/eBooks/Robert Silverberg/Fantasy - the Best of 2001 (9777)/Fantasy - the Best of 2001 - Robert Silverberg.epub. Click "Show Details" for more info.

Show details yields:

calibre, version 8.9.0
ERROR: Loading book failed: Failed to open the book at /media/<elided>/eBooks/eBooks/Robert Silverberg/Fantasy - the Best of 2001 (9777)/Fantasy - the Best of 2001 - Robert Silverberg.epub. Click "Show details" for more info.

Failed to convert book: /media/<elided>/eBooks/eBooks/Robert Silverberg/Fantasy - the Best of 2001 (9777)/Fantasy - the Best of 2001 - Robert Silverberg.epub with error:
DeDRM v10.0.9: Trying to decrypt Fantasy - the Best of 2001 - Robert Silverberg.epub
DeDRM v10.0.9: Verifying zip archive integrity
DeDRM v10.0.9: Post-processing took 0.0 seconds
DeDRM v10.0.9: Finished after 0.4 seconds
InputFormatPlugin: EPUB Input running
on /tmp/calibre-l8elmsrk/a0ivjmem.epub
Failed to run pipe worker with command: from calibre.srv.render_book import viewer_main; viewer_main()
Traceback (most recent call last):
File "runpy.py", line 198, in _run_module_as_main
File "runpy.py", line 88, in _run_code
File "site.py", line 47, in <module>
File "site.py", line 43, in main
File "calibre/utils/ipc/worker.py", line 194, in main
File "<string>", line 1, in <module>
File "calibre/srv/render_book.py", line 847, in viewer_main
File "calibre/srv/render_book.py", line 838, in render_for_viewer
File "calibre/srv/render_book.py", line 816, in render
File "calibre/srv/render_book.py", line 618, in process_exploded_book
calibre.srv.render_book.Spineless: Book is empty, no content in spine

The book mentioned above opens in Moon Reader Pro on an android device without problem or complaint. I can also edit the book in Calibre and see the underlying image and HTML files, and view them there without problems.

This same general error happens for multiple (at least 20 of the 30 that I tried) ePub files in my library. These files have been in my library for a long time (since at least version 6.x). Ideas on what might be causing this? If a copy of the ePub is needed to check, I can supply one (but obviously I didn't want to post it here).
Arisia is offline   Reply With Quote
Old Yesterday, 04:29 PM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 80,030
Karma: 147977995
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Arisia View Post
Ubuntu 22.04 with latest updates and patches
Calibre 8.9.0

Some (not all) ePub files in my library are producing the following errors when opened with E-Book Viewer:

Failed to open book at /media/<elided>/eBooks/eBooks/Robert Silverberg/Fantasy - the Best of 2001 (9777)/Fantasy - the Best of 2001 - Robert Silverberg.epub. Click "Show Details" for more info.

Show details yields:

calibre, version 8.9.0
ERROR: Loading book failed: Failed to open the book at /media/<elided>/eBooks/eBooks/Robert Silverberg/Fantasy - the Best of 2001 (9777)/Fantasy - the Best of 2001 - Robert Silverberg.epub. Click "Show details" for more info.

Failed to convert book: /media/<elided>/eBooks/eBooks/Robert Silverberg/Fantasy - the Best of 2001 (9777)/Fantasy - the Best of 2001 - Robert Silverberg.epub with error:
DeDRM v10.0.9: Trying to decrypt Fantasy - the Best of 2001 - Robert Silverberg.epub
DeDRM v10.0.9: Verifying zip archive integrity
DeDRM v10.0.9: Post-processing took 0.0 seconds
DeDRM v10.0.9: Finished after 0.4 seconds
InputFormatPlugin: EPUB Input running
on /tmp/calibre-l8elmsrk/a0ivjmem.epub
Failed to run pipe worker with command: from calibre.srv.render_book import viewer_main; viewer_main()
Traceback (most recent call last):
File "runpy.py", line 198, in _run_module_as_main
File "runpy.py", line 88, in _run_code
File "site.py", line 47, in <module>
File "site.py", line 43, in main
File "calibre/utils/ipc/worker.py", line 194, in main
File "<string>", line 1, in <module>
File "calibre/srv/render_book.py", line 847, in viewer_main
File "calibre/srv/render_book.py", line 838, in render_for_viewer
File "calibre/srv/render_book.py", line 816, in render
File "calibre/srv/render_book.py", line 618, in process_exploded_book
calibre.srv.render_book.Spineless: Book is empty, no content in spine

The book mentioned above opens in Moon Reader Pro on an android device without problem or complaint. I can also edit the book in Calibre and see the underlying image and HTML files, and view them there without problems.

This same general error happens for multiple (at least 20 of the 30 that I tried) ePub files in my library. These files have been in my library for a long time (since at least version 6.x). Ideas on what might be causing this? If a copy of the ePub is needed to check, I can supply one (but obviously I didn't want to post it here).
Install the epubcheck plugin (for the editor) and use that and the built-in error checker to check what's wrong with your eBooks.
JSWolf is offline   Reply With Quote
Old Yesterday, 06:02 PM   #3
Arisia
Junior Member
Arisia began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Nov 2024
Device: Moon+ on Android
Quote:
Originally Posted by JSWolf View Post
Install the epubcheck plugin (for the editor) and use that and the built-in error checker to check what's wrong with your eBooks.
So I installed the plugin (thanks for the pointer ), but it doesn't really seem to tell me much about the ePub referenced in my first message. Here's all the output it gives me:

ERROR: Parsing failed: Opening and ending tag mismatch: head line 1 and HEAD, line 1, column 275****[OEBPS/ title-page.htm:1]

and here is the portion it appears to be complaining about:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="application/vnd.adobe-page-template+xml" href="page-template.xpgt"/></HEAD><BODY><div align="center">
Now, I can see that the case of the tags (head vs /HEAD) is different, but I believe that HTML is case insensitive (I could be wrong - it has been years since I actually wrote any HTML), so this should be a non-issue. Also, the preview window correctly shows the title page...

Any other ideas or suggestions?
Arisia is offline   Reply With Quote
Old Yesterday, 07:58 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 80,030
Karma: 147977995
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Post the title-page.htm so I or someone else can have a look at it,
JSWolf is offline   Reply With Quote
Old Yesterday, 08:54 PM   #5
slm
Fool
slm ought to be getting tired of karma fortunes by now.slm ought to be getting tired of karma fortunes by now.slm ought to be getting tired of karma fortunes by now.slm ought to be getting tired of karma fortunes by now.slm ought to be getting tired of karma fortunes by now.slm ought to be getting tired of karma fortunes by now.slm ought to be getting tired of karma fortunes by now.slm ought to be getting tired of karma fortunes by now.slm ought to be getting tired of karma fortunes by now.slm ought to be getting tired of karma fortunes by now.slm ought to be getting tired of karma fortunes by now.
 
Posts: 476
Karma: 4113712
Join Date: Feb 2003
Device: Kindle: Voyage,PW1,KOA, Kobo: Clara Colour, Nook GLP, Pocketbook verse
Quote:
Originally Posted by Arisia View Post

Now, I can see that the case of the tags (head vs /HEAD) is different, but I believe that HTML is case insensitive (I could be wrong - it has been years since I actually wrote any HTML), so this should be a non-issue. Also, the preview window correctly shows the title page...

Any other ideas or suggestions?
HTML is not case sensitive but XTML is. I'm not sure that the epub standard treats these files as HTML.
slm is offline   Reply With Quote
Old Yesterday, 09:37 PM   #6
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,577
Karma: 79436804
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Why not use the ScrambleEbook plugin and upload the scrambled book...
PeterT is offline   Reply With Quote
Old Yesterday, 09:43 PM   #7
Arisia
Junior Member
Arisia began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Nov 2024
Device: Moon+ on Android
Quote:
Originally Posted by JSWolf View Post
Post the title-page.htm so I or someone else can have a look at it,
Here's the title-page.htm, as shown in the Edit Book screen.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="application/vnd.adobe-page-template+xml" href="page-template.xpgt"/></HEAD><BODY><div align="center">
<font size="5"><b>Fantasy The Best of 2001</b></font><br />
<br />
<font size="3">ROBERT SILVERBERG AND KAREN HABER<br />
<br />
</font><br />
<img src="logo.jpg" size="100%" />
<br />
<font size="2">ibooks<br />
new york<br />
<a href="http://www.ibooksinc.com">www.ibooksinc.com</a></font></div>
</BODY></HTML>
So, like I said, I'm not sure the head vs /HEAD is the root of the problem. I will look at a few others that don't open in the E-Book Viewer and see if they have the same issue. If not, I'm thinking that there may be some deeper issue going on here....
Arisia is offline   Reply With Quote
Old Yesterday, 10:14 PM   #8
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: 31,134
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Mine looks quite different except for the body content. (Mine is also beautified for easy reading)

Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <title>Unknown</title>
</head>

<body>

  <div align="center">

    <font size="5"><b>Science Fiction The Best of 2001</b></font>

    <br/>

    <br/>

    <font size="3">Robert Silverberg and Karen Haber<br/> <br/> </font>

    <br/>

    <img src="logo.jpg" size="100%"/>

    <br/>

    <font size="2">ibooks<br/> new york<br/> <a href="http://www.ibooksinc.com">www.ibooksinc.com</a></font>

  </div>

</body>

</html>
It is almost like someone did an edit and removed/added stuff
theducks is offline   Reply With Quote
Old Yesterday, 10:46 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,447
Karma: 27757438
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Do an epub to epub conversion, that will fix them.
kovidgoyal is offline   Reply With Quote
Old Today, 01:46 AM   #10
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,997
Karma: 169810634
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Just for the heck of it, I stuffed your posted code into Sigil and did a mend and prettify on it.

Spoiler:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <link rel="stylesheet" type="application/vnd.adobe-page-template+xml" href="page-template.xpgt"/>
  <title></title>
</head>

<body>
  <div align="center">
    <font size="5"><b>Fantasy The Best of 2001</b></font><br/>

    <br/>

    <font size="3">ROBERT SILVERBERG AND KAREN HABER<br/> <br/> </font><br/>

    <img src="logo.jpg" size="100%"/> <br/>

    <font size="2">ibooks<br/> new york<br/> <a href="http://www.ibooksinc.com">www.ibooksinc.com</a></font>
  </div>
</body>
</html>


One nasty item is that your code seems to use random case (<head> and </HEAD> for example).

I also stuffed your code into calibre's editor and ran it's internal bugchecker (the ladybug icon). I've attached those results as an image.

Basically, Garbage in, Garbage out.
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2025-08-27 224512.png
Views:	14
Size:	129.9 KB
ID:	217774  
DNSB is offline   Reply With Quote
Old Today, 07:20 AM   #11
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 80,030
Karma: 147977995
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Arisia View Post
Here's the title-page.htm, as shown in the Edit Book screen.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="application/vnd.adobe-page-template+xml" href="page-template.xpgt"/></HEAD><BODY><div align="center">
<font size="5"><b>Fantasy The Best of 2001</b></font><br />
<br />
<font size="3">ROBERT SILVERBERG AND KAREN HABER<br />
<br />
</font><br />
<img src="logo.jpg" size="100%" />
<br />
<font size="2">ibooks<br />
new york<br />
<a href="http://www.ibooksinc.com">www.ibooksinc.com</a></font></div>
</BODY></HTML>
So, like I said, I'm not sure the head vs /HEAD is the root of the problem. I will look at a few others that don't open in the E-Book Viewer and see if they have the same issue. If not, I'm thinking that there may be some deeper issue going on here....
The entire HTML needs to be scrapped and rewritten correctly. It's very much a mess that generates a lot of errors with epubcheck.

Here is your title page after an ePub to ePub conversion.

Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>The Eagle has Landed</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <link rel="stylesheet" type="text/css" href="../stylesheet.css"/>
</head>
  <body class="calibre">
<p class="tit"><b class="calibre1">The Eagle Has Landed</b></p>
<p class="stit">The Liam Devlin Novels</p>
<p class="tit1">Jack Higgins</p>
<p class="ser"><img alt="img" src="images/logo.jpg" class="calibre2"/></p>
</body>
</html>

Last edited by JSWolf; Today at 07:24 AM.
JSWolf is offline   Reply With Quote
Reply

Tags
calibre, epub, ubuntu 22.04, viewer


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle Fails to Correctly Identify the Language of EPUB Files aefiufae Amazon Kindle 5 09-09-2023 12:36 AM
Calibre 6.24 viewer fails to render this epub cristis Viewer 4 08-06-2023 11:07 PM
Viewer modifies EPUB files joycelow100 Calibre 12 11-25-2022 12:57 AM
Caliber ebook Viewer ALTERS my epub files! Lexical Viewer 4 09-07-2022 02:00 AM
Ebook Viewer damages epub files? Sneddles Library Management 5 05-09-2013 04:21 PM


All times are GMT -4. The time now is 12:35 PM.


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