Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 10-17-2018, 05:31 PM   #1
BKh
Connoisseur
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
Posts: 91
Karma: 1000
Join Date: Mar 2011
Device: Kindle
"Error while parsing file 'Multiple occurrences of the 'cover-image' property "

I wonder if some kind stranger can help me figure this out.

I did a epub validation check here:http://validator.idpf.org/

And got these errors:
Code:
Type 	File 	Line 	Position 	Message
ERROR 	OEBPS/content.opf 	13 	13 	Error while parsing file 'Multiple occurrences of the 'cover-image' property (number of 'cover-image' items: 2).'.
ERROR 	OEBPS/content.opf 	14 	99 	Package resource 'OEBPS/Images/cover.png' is declared in several manifest item.
ERROR 	OEBPS/Text/guide.xhtml 	18 	64 	Referenced resource could not be found in the EPUB.
In the manifest section of content.opf, it occurs twice:
Code:
<item id="cover_png" href="Images/cover.png" media-type="image/png" properties="cover-image"/>
<item id="cover.png" href="Images/cover.png" media-type="image/png" properties="cover-image"/>
So, could someone explain if I should keep the line with id="cover_png" or id="cover.png"? I have never had to mess around with these before.

I attached the whole content.opf, but here are some parts that may help solve the problem.
This is the start of the content.opf file:

Code:
<?xml version="1.0" encoding="utf-8"?>
<package version="3.0" unique-identifier="BookID" xmlns="http://www.idpf.org/2007/opf" prefix="rendition: http://www.idpf.org/vocab/rendition/#">
  <metadata xmlns:opf="http://www.idpf.org/2007/opf" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/">
    <dc:title id="title1">Aṅguttaranikāya: Numbered Discourses</dc:title>
    <meta refines="#title1" property="title-type">main</meta>
    <dc:creator id="create1">Bhikkhu Sujato</dc:creator>
    <dc:language>en</dc:language>
    <meta name="Sigil version" content="0.9.9" />
    <dc:identifier id="BookID">urn:uuid:73b4776c-6ed1-41ca-8b0e-b766ded5e300</dc:identifier>
    <meta property="dcterms:modified">2018-10-17T15:05:30Z</meta>
    <meta name="cover" content="cover.png" />
  </metadata>
  <manifest>
    <item id="cover_png" href="Images/cover.png" media-type="image/png" properties="cover-image"/>
    <item id="stylesheet" href="Styles/stylesheet.css" media-type="text/css"/>
    <item id="toc" href="toc.ncx" media-type="application/x-dtbncx+xml"/>
    <item id="Section0001.xhtml" href="Text/Section0001.xhtml" media-type="application/xhtml+xml"/>
    <item id="guide" href="Text/guide.xhtml" media-type="application/xhtml+xml"/>
    <item id="an1.1-10" href="Text/an1.1-10.xhtml" media-type="application/xhtml+xml"/>
    <item id="an1.11-20" href="Text/an1.11-20.xhtml" media-type="application/xhtml+xml"/>
This is in the middle:

Code:
    <item id="an11.983-991" href="Text/an11.983-991.xhtml" media-type="application/xhtml+xml"/>
    <item id="an11.992-1151" href="Text/an11.992-1151.xhtml" media-type="application/xhtml+xml"/>
    <item id="cover.png" href="Images/cover.png" media-type="image/png" properties="cover-image"/>
    <item id="cover.xhtml" href="Text/cover.xhtml" media-type="application/xhtml+xml" properties="svg"/>
    <item id="intro.xhtml" href="Text/intro.xhtml" media-type="application/xhtml+xml"/>
    <item id="SourceSerifPro-Bold.otf" href="Fonts/SourceSerifPro-Bold.otf" media-type="application/vnd.ms-opentype"/>
    <item id="SourceSerifPro-BoldIt.otf" href="Fonts/SourceSerifPro-BoldIt.otf" media-type="application/vnd.ms-opentype"/>
    <item id="SourceSerifPro-It.otf" href="Fonts/SourceSerifPro-It.otf" media-type="application/vnd.ms-opentype"/>
    <item id="SourceSerifPro-Regular.otf" href="Fonts/SourceSerifPro-Regular.otf" media-type="application/vnd.ms-opentype"/>
    <item id="navid" href="Text/nav.xhtml" media-type="application/xhtml+xml" properties="nav"/>
  </manifest>
  <spine toc="toc">
    <itemref idref="cover.xhtml"/>
    <itemref idref="intro.xhtml"/>
    <itemref idref="Section0001.xhtml"/>
And this is the end:

Code:
    <itemref idref="an11.502-981"/>
    <itemref idref="an11.982"/>
    <itemref idref="an11.983-991"/>
    <itemref idref="an11.992-1151"/>
    <itemref idref="navid"/>
  </spine>
  <guide>
    <reference type="toc" title="Table of Contents" href="Text/guide.xhtml"/>
    <reference type="text" title="Text" href="Text/an1.1-10.xhtml"/>
    <reference type="title-page" title="Title Page" href="Text/intro.xhtml"/>
    <reference type="cover" title="Cover" href="Text/cover.xhtml"/>
  </guide>
</package>
Attached Files
File Type: opf content.opf (164.2 KB, 24 views)
BKh is offline   Reply With Quote
Old 10-17-2018, 07:30 PM   #2
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 1,084
Karma: 6030009
Join Date: Jul 2012
Device: Kobo Forma, Nook
Did you use some other program to create this EPUB (InDesign->EPUB, Word->EPUB, [...])?

Or did you try to zip this manually?

Or did you use Sigil/Calibre?

Something like this shouldn't occur normally...

* * *

Looks like these are the two issues:

1. The book is expecting you to have a file guide.xhtml, but it isn't in the EPUB.

Maybe whatever tool you used to create the EPUB forgot to create this file. Looks like it may have been the name of your HTML Table of Contents (did you accidentally delete it?).

2. It looks like your cover file is cover.png, so you should be able to delete this extra line:

Code:
<item id="cover_png" href="Images/cover.png" media-type="image/png" properties="cover-image"/>
Explanation: There's only supposed to be a single cover for the EPUB... but whatever tool you used accidentally points to the cover twice.

Last edited by Tex2002ans; 10-17-2018 at 07:34 PM.
Tex2002ans is offline   Reply With Quote
Old 10-18-2018, 12:00 AM   #3
BKh
Connoisseur
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
Posts: 91
Karma: 1000
Join Date: Mar 2011
Device: Kindle
Thank you so much for your message.

Quote:
Looks like these are the two issues:

1. The book is expecting you to have a file guide.xhtml, but it isn't in the EPUB.

2. It looks like your cover file is cover.png, so you should be able to delete this extra line:

Code:
<item id="cover_png" href="Images/cover.png" media-type="image/png" properties="cover-image"/>
Explanation: There's only supposed to be a single cover for the EPUB... but whatever tool you used accidentally points to the cover twice.
So, the original file came from a website that auto-generates the file from content on the site. I don't know what they were using on the backend to create it but I will ask.

The file I posted was from a later version that I worked on in Sigil. At one point in the process I used the epub2 to epub3 export plugin.

I went back to the original file and found this...
Code:
<item id="cover_png" properties="cover-image" href="images/cover.png" media-type="image/png"/>
<item href="images/cover.png" id="img001" media-type="image/png"/>
Different from what I posted in the OP, but clearly still not right.

The validator in Sigil had never had any issue before or after converting it to epub3. In fact the only reason I am hopping down this rabbit hole is that the cover isn't showing up when the book is uploaded to google books/play. But for now I'm just trying to get it to validate so I can rule that out.

Thanks again! I still need to investigate point 1 in your very helpful message.
BKh is offline   Reply With Quote
Old 10-18-2018, 12:33 AM   #4
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 1,084
Karma: 6030009
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by BKh View Post
I went back to the original file and found this...
Code:
<item id="cover_png" properties="cover-image" href="images/cover.png" media-type="image/png"/>
<item href="images/cover.png" id="img001" media-type="image/png"/>
Different from what I posted in the OP, but clearly still not right.

[...]

In fact the only reason I am hopping down this rabbit hole is that the cover isn't showing up when the book is uploaded to google books/play.
Another step you might want to try if you want to have take an easy way out.

Open the EPUB in Sigil:

1. Delete the cover.xhtml + cover.png files. This should clean up the content.opf and remove any crappy/broken references to those files.

2. Add the cover.png back into the EPUB, then Tools > Add Cover. This should create a clean cover.xhtml file, and also assign the correct Cover metadata to the proper image.

Quote:
Originally Posted by BKh View Post
The validator in Sigil had never had any issue before or after converting it to epub3. But for now I'm just trying to get it to validate so I can rule that out.
What validator? FlightCrew? That one is only good for a rough check (and isn't really maintained any more).

The actual true EPUB validator you'll have to use is always epubcheck (it's the one that stores use).
Tex2002ans is offline   Reply With Quote
Old 10-18-2018, 01:28 AM   #5
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: 5,144
Karma: 21886264
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Aura One, Aura H2O, Aura HD, Nexus 7 HD, iPad Air, Tolino epos
Looking at your content.opf, it looks as if almost every page in the original document is showing in the epub a separate file. Weird and wonderful...

Last edited by DNSB; 10-18-2018 at 01:34 AM.
DNSB is offline   Reply With Quote
Old 10-18-2018, 01:33 AM   #6
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: 5,144
Karma: 21886264
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Aura One, Aura H2O, Aura HD, Nexus 7 HD, iPad Air, Tolino epos
Quote:
Originally Posted by Tex2002ans View Post
What validator? FlightCrew? That one is only good for a rough check (and isn't really maintained any more).

The actual true EPUB validator you'll have to use is always epubcheck (it's the one that stores use).
I suspect the F7 (Well-Formed Check Epub) tool is being referred to. FlightCrew has it's uses for epub2 but will not check an epub3.
DNSB is offline   Reply With Quote
Old 10-18-2018, 12:42 PM   #7
BKh
Connoisseur
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
Posts: 91
Karma: 1000
Join Date: Mar 2011
Device: Kindle
Quote:
Originally Posted by Tex2002ans View Post
Another step you might want to try if you want to have take an easy way out.

Open the EPUB in Sigil:

1. Delete the cover.xhtml + cover.png files. This should clean up the content.opf and remove any crappy/broken references to those files.

2. Add the cover.png back into the EPUB, then Tools > Add Cover. This should create a clean cover.xhtml file, and also assign the correct Cover metadata to the proper image.
OK, I did this but this was still in the content.opf:
Code:
<manifest>
    <item id="cover_png" href="Images/cover.png" media-type="image/png" properties="cover-image"/>
So I deleted the <item... and used the Tools>Add Cover feature in Sigil. (FWIW, I thought I did this already, but I guess not)

Yay! This is the only thing in the .opf:
Code:
<item id="cover.png" href="Images/cover.png" media-type="image/png" properties="cover-image"/>
except for this, but I guess this is ok:
Code:
<meta content="cover.png" name="cover" />
  </metadata>
I ran the check again and tada! It checks out. Thank you so much. I fixed the guide.xhtml problem too. It was a bad link.

Thanks everyone!
BKh is offline   Reply With Quote
Old 10-18-2018, 05:14 PM   #8
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 19,224
Karma: 99356142
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by DNSB View Post
I suspect the F7 (Well-Formed Check Epub) tool is being referred to. FlightCrew has it's uses for epub2 but will not check an epub3.
And as we have to point out repeatedly ... Sigil's Well-Formed Check is not a "Validator" of any kind. Sigil itself is out of the EPUB validation game. Validation is achieved through plugins: there are plugins available for Flightcrew (EPUB2) or EpubCheck (EPUB2/3).

The Well-Formed Check (F7) in Sigil checks that there is no malformed xhtml (all tags properly closed, no improper nesting). Nothing more.

So it's not surprising at all that Sigil itself wouldn't catch a well-formed OPF file with an out of spec (EPUB spec) entry.
DiapDealer is offline   Reply With Quote
Old 10-18-2018, 07:57 PM   #9
BKh
Connoisseur
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
Posts: 91
Karma: 1000
Join Date: Mar 2011
Device: Kindle
Quote:
Originally Posted by DiapDealer View Post
And as we have to point out repeatedly ... Sigil's Well-Formed Check is not a "Validator" of any kind. Sigil itself is out of the EPUB validation game.
In fairness, the Well-Formed Check produces this...


Could it just say "results"?

If it has to be pointed out so often, it might be good to have a message in the results reminding people.

In any case, thank you for the reminder.
Attached Thumbnails
Click image for larger version

Name:	18-10-18 17_48_25-_Error while parsing file 'Multiple occurrences of the 'cover-image' property .png
Views:	68
Size:	6.4 KB
ID:	166998  
BKh is offline   Reply With Quote
Old 10-18-2018, 08:30 PM   #10
BKh
Connoisseur
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
Posts: 91
Karma: 1000
Join Date: Mar 2011
Device: Kindle
BTW, now when I upload the book to google books the cover displays perfectly.

Thanks again for everyone's help.
BKh is offline   Reply With Quote
Old 10-19-2018, 10:00 AM   #11
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 19,224
Karma: 99356142
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by BKh View Post
In fairness, the Well-Formed Check produces this...

Could it just say "results"?

If it has to be pointed out so often, it might be good to have a message in the results reminding people.

In any case, thank you for the reminder.
Any "checking" routine (which also includes "real" validation plugins) will share that same Results widget, so any title will need to be a one-size-fits-all kind of thing. We will, however, take it under advisement about adding a message to the end of the Well-Formed Check results.
DiapDealer is offline   Reply With Quote
Old 10-19-2018, 02:19 PM   #12
BKh
Connoisseur
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
Posts: 91
Karma: 1000
Join Date: Mar 2011
Device: Kindle
Quote:
Originally Posted by DiapDealer View Post
Any "checking" routine (which also includes "real" validation plugins) will share that same Results widget, so any title will need to be a one-size-fits-all kind of thing. We will, however, take it under advisement about adding a message to the end of the Well-Formed Check results.
Thanks for all you help. I can't imagine creating ebooks without Sigil.
BKh is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"used anchor page_i has multiple positions" error mabelsound Conversion 7 10-12-2018 08:21 AM
Bug: multiple "cover-image" tags David Kudler Sigil 9 08-18-2017 02:54 PM
Can't add cover in Calibre -- get "svg-error" (the property 'svg' should be declared) Just some guy Editor 7 04-11-2017 10:54 PM
"Error while parsing file 'element "img" not allowed here" shotsfromthebar Editor 3 03-31-2017 04:53 AM
this file converts with no error but the resulting file is "invalid" mlevin77 Conversion 3 01-11-2014 09:34 AM


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


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