Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 09-19-2020, 02:02 PM   #1
Moonlit Sky
Junior Member
Moonlit Sky began at the beginning.
 
Moonlit Sky's Avatar
 
Posts: 6
Karma: 10
Join Date: Sep 2020
Device: Windows (Calibre viewer), iPad (Marvin)
"Could not read cover from epub"

The other day, I added a new EPUB into my library, originally downloaded from Archive Of Our Own, with some edits made in Sigil because I'm finicky about formatting. This is a standard workflow for me, and usually it leads to Calibre generating a cover based on the book's first page of text.

This time, though, instead of that, Calibre gave the book the Default Unmarked Blue Cover. When I went into the book's metadata and directly told Calibre to set the book cover from the EPUB format (the only format available), it then gave me this error:

Code:
calibre, version 4.19.0
ERROR: Could not read cover: Could not read cover from epub format
...and apparently this error has never before been posted on the Google-accessible internet, because when I did a search for the error in quotes, zero results came up. (Results when searching without quotes were existent but not actually about this particular error.)

Since then, I've confirmed that it's not a more general problem with my Calibre installation; a second EPUB I subsequently put together in Sigil got the usual autogenerated preview as its cover image, as did a third EPUB downloaded off of Archive Of Our Own and edited in Sigil in the same manner as the error-prone one. (Which continues to yield the same error, when I try to generate a cover from the EPUB.) I am, at this point, Confused.

So, my question: does anyone have any idea what might be causing that error, or how I might be able to fix it? For the moment I've fallen back on Calibre's "Generate cover" option, since it's a lot better than the Default Blank Blue Cover; but it's aesthetically off-pattern compared with the rest of my library, and as such I'd still rather find a way to make it do the usual cover-as-book-preview thing if possible.
Moonlit Sky is offline   Reply With Quote
Old 09-19-2020, 02:30 PM   #2
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: 29,782
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Look at the OPF code
A cover has 2 semantic components:
1) the image file
2) the file it resides on. Note a file can only have 1 semantic set, which is why Calibre creates the 'Titlepage' (the name is not important, it is the Flags in the OPF, point to it
theducks is offline   Reply With Quote
Advert
Old 09-19-2020, 04:35 PM   #3
Moonlit Sky
Junior Member
Moonlit Sky began at the beginning.
 
Moonlit Sky's Avatar
 
Posts: 6
Karma: 10
Join Date: Sep 2020
Device: Windows (Calibre viewer), iPad (Marvin)
Quote:
Originally Posted by theducks View Post
Look at the OPF code
A cover has 2 semantic components:
1) the image file
2) the file it resides on. Note a file can only have 1 semantic set, which is why Calibre creates the 'Titlepage' (the name is not important, it is the Flags in the OPF, point to it
I suspect this advice is aimed at a different problem than the one I'm having.

The book which is producing the error has no cover image in the book, and no files with either the Cover semantic or the Title Page semantic set. Its first HTML file is the one containing the first chapter. Normally, under those conditions, Calibre auto-generates a cover which is essentially just a screencap of the book's first page, and adds that cover into its metadata for the book (but not into the book file's internal medatata, unless I specifically tell it to); this time, it's instead producing an error.

Jus to make sure, I double-checked, and there's no difference in internal .opf code structure between the error-producing book and a different book which Calibre auto-generated a cover from in the usual way without error. Both contain, in order:

-metadata
--publisher
--calibre series index
--description
--language
--creator
--calibre timestamp
--calibre title sort
--calibre series
--date
--title
--identifier
--a bunch of subject tags
--sigil version
--date modified
-manifest
--a bunch of chapters
--ncx (table of contents)
-spine
--a bunch of chapters

...and that's it.
Moonlit Sky is offline   Reply With Quote
Old 09-19-2020, 07:51 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: 29,782
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Nailed your problem.
You have no 'cover' declared. (naming the file does not do this)

<meta name="cover" content="cover"/>
<item href="cover.jpg" id="cover" media-type="image/jpeg"/> ties the 2 lines together

<guide>
<reference type="text" title="" href="part0004.xhtml"/>
<reference type="toc" title="Contents" href="part0003.xhtml"/>
<reference href="titlepage.xhtml" title="Cover" type="cover"/>
</guide>
theducks is offline   Reply With Quote
Old 09-19-2020, 08:09 PM   #5
Moonlit Sky
Junior Member
Moonlit Sky began at the beginning.
 
Moonlit Sky's Avatar
 
Posts: 6
Karma: 10
Join Date: Sep 2020
Device: Windows (Calibre viewer), iPad (Marvin)
Quote:
Originally Posted by theducks View Post
Nailed your problem.
You have no 'cover' declared. (naming the file does not do this)

<meta name="cover" content="cover"/>
<item href="cover.jpg" id="cover" media-type="image/jpeg"/> ties the 2 lines together

<guide>
<reference type="text" title="" href="part0004.xhtml"/>
<reference type="toc" title="Contents" href="part0003.xhtml"/>
<reference href="titlepage.xhtml" title="Cover" type="cover"/>
</guide>
That's not the problem, though. As I said, the lack of declared cover is consistent between the two files, of which one throws the error and one doesn't; thus, it's definitely not the cause of the error.
Moonlit Sky is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mark Cover Grid / Thumbnails as Read or Not Read iridius Calibre 8 12-11-2019 12:43 AM
Marvin and Aldiko Can't Read ePub Metadata or Cover Page mjdz Marvin 2 06-24-2017 10:05 PM
Kindle Oasis - will you Read with Cover On or Cover Off? tubemonkey Amazon Kindle 55 05-20-2016 11:38 PM
How many ebooks have you read from cover to cover? Julius Caesar General Discussions 58 10-16-2013 12:06 AM


All times are GMT -4. The time now is 08:26 PM.


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