Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 09-14-2022, 05:46 AM   #1
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
this epub has HTML files that are not well formed or are missing a doctype..

i am so fed up of seeing this when I open a book in sigil

and it returns EVERY TIME i use modify :e.g. i fix it with "mend & prettify" and test that it opens with no errors, but then re run modify epub on the book, open it again and its back!

very few options ticked in modify epub ::just fix spans, cover, TOC, update metadata. and anyway , running it a 2nd time without doing anything other than mend and prettify should give it nothing to modify?
yet somehow it reintroduces this error, every single time

so easy to prove
open book in sigil - no error
close book
run modify epub
open book in sigil - error is back

someone please tell me how to break the cycle
stumped is offline   Reply With Quote
Old 09-14-2022, 06:14 AM   #2
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: 28,824
Karma: 206879174
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
What is "run modify epub"? It seems pretty clear to me that whatever it is, it's doing something that removes the doctype that Sigil requires.

Last edited by DiapDealer; 09-14-2022 at 06:27 AM.
DiapDealer is offline   Reply With Quote
Advert
Old 09-14-2022, 06:23 AM   #3
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: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by stumped View Post
this epub has HTML files that are not well formed or are missing a doctype..
Well, what's your code before/after Sigil opens it?

Were you missing the DOCTYPE?

- - -

Note: Back in Sigil 1.4.0, KevinH added more robust checks for DOCTYPE. You can read his exact explanation here:

Sigil uses DOCTYPE, and Calibre sometimes (always?) strips it out. So if you are constantly flipping back/forth between Sigil/Calibre, you might get this window popping up often.

Quote:
Originally Posted by DiapDealer View Post
What is "run modify epub"? It seems pretty clear to me that whatever it is, it's doing something it shouldn't.
Sound like the Calibre Plugin:

Last edited by Tex2002ans; 09-14-2022 at 06:25 AM.
Tex2002ans is offline   Reply With Quote
Old 09-14-2022, 08:21 AM   #4
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: 28,824
Karma: 206879174
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Sounds like the calibre plugin (or calibre) is removing the doctype. That's not really in keeping with the declared goal of the Modify Epub plugin. Which is to allow very specific, user-defined epub tweaks without performing a full calibre epub-to-epub conversion.

A couple of solutions come to mind:

1) if someone takes over maintaining the calibre Modify Epub plugin after davidfor's death, ask them if it's possible for the plugin to stop silently removing the doctype.

2) change your workflow so that there is no back and forth between calibre/sigil when editing epubs. Whichever editor you use the least, use it first and move on to editing with the one you use the most. i.e. do everything you need to do with Modify Epub and then Mend and Prettify with Sigil. Afterwhich, don't run Modify Epub on that book again. Or vice versa.

Last edited by DiapDealer; 09-14-2022 at 08:24 AM.
DiapDealer is offline   Reply With Quote
Old 09-14-2022, 08:56 AM   #5
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,475
Karma: 150249619
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 DiapDealer View Post
Sounds like the calibre plugin (or calibre) is removing the doctype. That's not really in keeping with the declared goal of the Modify Epub plugin. Which is to allow very specific, user-defined epub tweaks without performing a full calibre epub-to-epub conversion.

A couple of solutions come to mind:

1) if someone takes over maintaining the calibre Modify Epub plugin after davidfor's death, ask them if it's possible for the plugin to stop silently removing the doctype.

2) change your workflow so that there is no back and forth between calibre/sigil when editing epubs. Whichever editor you use the least, use it first and move on to editing with the one you use the most. i.e. do everything you need to do with Modify Epub and then Mend and Prettify with Sigil. Afterwhich, don't run Modify Epub on that book again. Or vice versa.
There is no problem running Modify ePub after editing in Sigil. I just give it a go and this I did not have this problem. Here is header for one of the HTML files after being run through Sigil and then Modify ePub.

I am running Calibre 6.4 and the latest Modify ePub.

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" xmlns:epub="http://www.idpf.org/2007/ops" lang="en" xml:lang="en">
<head>
<title>The Rising Tide</title>
<link href="../styles/stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
JSWolf is offline   Reply With Quote
Advert
Old 09-14-2022, 09:04 AM   #6
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: 28,824
Karma: 206879174
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
But did you open it with Sigil again after?
Sigil, Modify Epub, Sigil is the workflow @stumped described.

That's also an epub2 xhtml file you've shown. What happens with Epub3/HTML5?
DiapDealer is offline   Reply With Quote
Old 09-14-2022, 09:24 AM   #7
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,004
Karma: 6361444
Join Date: Nov 2009
Device: many
A sample epub based on a public domain epub that shows the issue and follows the op's workflow (both before and after modify epub is run) would be quite helpful to see what is actually going on.
KevinH is offline   Reply With Quote
Old 09-14-2022, 10:20 AM   #8
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,475
Karma: 150249619
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 DiapDealer View Post
But did you open it with Sigil again after?
Sigil, Modify Epub, Sigil is the workflow @stumped described.

That's also an epub2 xhtml file you've shown. What happens with Epub3/HTML5?
Workflow...
  1. Open in Sigil
  2. Yes to doctype
  3. save and close Sigil
  4. Run Modify ePub on this ePub
  5. Load into Sigil

There was no doctype requestor.
JSWolf is offline   Reply With Quote
Old 09-14-2022, 10:24 AM   #9
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: 28,824
Karma: 206879174
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
We still need to verify that the same options for Modify Epub are being selected. It sounds like there are quite a few choices available. Also, you still didn't mention whether you tested both EPUB2 and EPUB3.

And since Calibre is involved, we have to make sure the epub is not being opened in Sigil via the third-party calibre OpenWith plugin. I long ago gave up debugging the on-again-off-again issues that arose when running Sigil via Kiwidude's OpenWith calibre plugin. Especially when calibre's own internal Open With feature has worked fine for years.

Last edited by DiapDealer; 09-14-2022 at 10:34 AM.
DiapDealer is offline   Reply With Quote
Old 09-14-2022, 10:24 AM   #10
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,475
Karma: 150249619
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 KevinH View Post
A sample epub based on a public domain epub that shows the issue and follows the op's workflow (both before and after modify epub is run) would be quite helpful to see what is actually going on.
What options did you have selected in Modify ePub? These are the options I have selected.

Click image for larger version

Name:	Modify ePub.jpg
Views:	234
Size:	164.7 KB
ID:	196510
JSWolf is offline   Reply With Quote
Old 09-14-2022, 10:33 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,475
Karma: 150249619
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 DiapDealer View Post
We still need to verify that the same options for Modify Epub are being selected. It sounds like there are quite a few choices available. Also, you still didn't mention whether you tested both EPUB2 and EPUB3.
I've figures out what the problem is. It's due to the adding of the Jacket. The header used for the Jacket is what's triggering the doctype requestor in Sigil. The existing headers are not being modified.
JSWolf is offline   Reply With Quote
Old 09-14-2022, 10:40 AM   #12
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: 28,824
Karma: 206879174
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Well there you go. Change the Modify Epub plugin to make sure the new Jacket xhtml document is created with compatible (and standards-compliant) doctype and xml declaration (or whatever it is about the new code that Sigil believes is malformed).

Last edited by DiapDealer; 09-14-2022 at 10:48 AM.
DiapDealer is offline   Reply With Quote
Old 09-14-2022, 11:15 AM   #13
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: 28,824
Karma: 206879174
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Also... why would anyone need to generate a new jacket more than once anyway? Have Sigil fix it once and then move on. *shrug*
DiapDealer is offline   Reply With Quote
Old 09-14-2022, 12:19 PM   #14
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,004
Karma: 6361444
Join Date: Nov 2009
Device: many
So not a Sigil issue then. Thanks for tracking it down JSWolf. Will someone alert the new maintainer of this plugin?

FWIW ...

I did not see any license on modify epub plugin page in the calibre plugins forum but downloaded the code and looked at it and it seems to be all GPL V3. So anyone could adopt it. There is a jacket.py file that would need to check the container type (epub2 or epub3) and prepend the correct doctype to the jacket_data before writing it.

Should be very easy to do for someone familiar with calibre's plugin interface.

Last edited by KevinH; 09-14-2022 at 12:45 PM.
KevinH is offline   Reply With Quote
Old 09-14-2022, 02:03 PM   #15
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,209
Karma: 60406678
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by DiapDealer View Post
Also... why would anyone need to generate a new jacket more than once anyway? Have Sigil fix it once and then move on. *shrug*
I see this all the time. At first I thought it might be the sub-version of the EPUB2 spec. I just live with

I embed a fresh jacket any time I +fix+ my metadata.

I also do not always use Modify EPUB, but do use Polish or have the Calibre editor freshen.
There are features of Sigil I like better and there are edit-ebook features I like. So I use both and do NOT want either +fixed+ .
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
missing html files in a edited epub woooz Editor 4 05-18-2020 02:11 PM
Epub Doctype, Schema and Metadata? Clancolin Sigil 8 01-12-2016 06:15 AM
"HTML files that are not well formed" automa Sigil 6 06-10-2014 11:25 AM
ePub to HTML conversion missing links trevgrif Conversion 7 03-04-2014 09:47 PM
Missing epub package files Jbraunag ePub 3 02-13-2012 01:25 PM


All times are GMT -4. The time now is 05:58 PM.


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