![]() |
#526 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 265
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
epubcheck error display is incomplete
Using Sigil 2.3.1 with epubcheck 0.4.7.1
I converted a 'no fault found' epub2 to epub3 using the plugin epub3-itizer v0.5.8 and then ran epubcheck again and was horrified to see vast numbers of pink errors, 25 of which concerned images : Code:
OEBPS/Text/chapter10.xhtml,18,1118,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter10.xhtml,30,2338,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter10.xhtml,68,3887,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter10.xhtml,86,4610,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter10.xhtml,118,6146,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter10.xhtml,132,7188,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter10.xhtml,140,7419,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter11.xhtml,16,705,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter4.xhtml,77,3766,Col: 89: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter4.xhtml,118,8009,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter5.xhtml,17,839,Col: 89: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter5.xhtml,22,1098,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter5.xhtml,32,2127,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter6.xhtml,20,1345,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter6.xhtml,36,2282,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter6.xhtml,46,2917,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter7.xhtml,60,3084,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter7.xhtml,82,4029,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter8.xhtml,20,1171,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter8.xhtml,34,2041,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter8.xhtml,58,3444,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter8.xhtml,68,4162,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter8.xhtml,90,4786,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter8.xhtml,102,5810,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer OEBPS/Text/chapter9.xhtml,24,2111,Col: 68: ERROR(RSC-005): Error while parsing file: value of attribute ""width"" is invalid; must be an integer Code:
<img alt="Image 7.1" src="../Images/image017.gif" width="50%"/> Subsequent tests showed that epubcheck only reports 25 of these errors at a time. Once I had corrected these 25, I ran the epubcheck plugin again and got another 25. I imagine this is a function of the EPUBCheck v5.1.0 rather than the plugin. Could the plugin capture and display all instances of an error on the first run through? |
![]() |
![]() |
![]() |
#527 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,346
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
In the meantime, you could just do a regex search and replace to get all of the same errors:
Find: <img (.*?) width="(.*?)%"/> Replace: <img \1 width="\2"/> That should fix them all. The error comes from the % sign is no longer a thing for inline image styling. |
![]() |
![]() |
![]() |
#528 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,921
Karma: 168959602
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
As far as I know, epubcheck will only return 25 errors of a type. For me, that is more than enough since I tend to hit regex to correct the error and that will clean up all the instances of that error.
|
![]() |
![]() |
![]() |
#529 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,734
Karma: 5703586
Join Date: Nov 2009
Device: many
|
But I doubt you want to convert width="50%" to width="50" as 50 pixels is much different from 50% of the screen.
Much more likely, is to remove the width attribute and replace it with either a new "class" attribute or even an inline style attribute such as style="width:50%;" or something else that sets the limit for the width of the resulting image. |
![]() |
![]() |
![]() |
#530 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 265
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
<img\s+(alt="Image .+?")\s+(src="../Images/image\d+\.gif")\s+width="(\d+)%"\s*/> [ this also worked <img\s+(alt="[^"]*")\s+(src="[^"]*")\s+width="(\d+)%"\s*/> ] with a REPLACE: <img class="w\3" \2 \1/> [This put the alt entry at the end keeping it out of the way visually when checking images later.] Since many of the images had width=50%, I started with an additional CSS class in the style sheet : .w50 {height: auto;width: 50%} and then did a find/replace one at a time. This was a little tedious but pretty quick. When I came to an image with a different width %, if I then decided it would be better to keep it at that width, I just created an additional CSS style entry. Afterwards, I was curious to find out why all the image entries were not displayed as errors by the epubcheck plugin. So I redid the epub3 conversion and investigated. I also had a look at the log and saw that it had a line: Code:
"message" : "Error while parsing file: value of attribute \"width\" is invalid; must be an integer", "additionalLocations" : 50, Last edited by philja; 10-23-2024 at 05:27 PM. |
|
![]() |
![]() |
![]() |
#531 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,725
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
The plugin runs EPUBCheck in JSON output mode, and in that mode only the first 25 occurrences are shown. I.e., there's nothing I can do about it.
|
![]() |
![]() |
![]() |
#532 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,734
Karma: 5703586
Join Date: Nov 2009
Device: many
|
And since the user typically reruns the plugin repeatedly until no more errors are reported, that works just fine. As others have pointed out, you do not need to have an error "reported" to "fix" things once an ealier error shows you a repeated general error class. That is one of the primary uses for regular expression find and replace.
|
![]() |
![]() |
![]() |
#533 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,665
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#534 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 265
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
Had I been a bit more competent, I'd have found a way to automate the creation of each new class. As it was, I wrote the first one, (.w50) and copy / pasted 3 copies which just needed the number changing in the name and width. |
|
![]() |
![]() |
![]() |
#535 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Mar 2025
Device: Kobo
|
EPUBCheck 5.2.1 Java Error
After a complete reinstall on my PC, I now get this error when I try to run the epubcheck plugin:
Status: failed Running EPUBCheck 5.2.1... please wait. EPUBCheck Java error. java.lang.StackOverflowError at com.thaiopensource.relaxng.pattern.DuplicateAttrib uteDetector.startChoice(DuplicateAttributeDetector .java:42) etc... sigil version: 2.4.2 java version: 1.8.0.441 other plugins work OK, so I don't understand what I', doing wrong. Any suggestions? |
![]() |
![]() |
![]() |
#536 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,734
Karma: 5703586
Join Date: Nov 2009
Device: many
|
You are probably using a 32 bit version of Java instead of a 64 bit version of java, resulting in very small stacks which overflowed.
Try removing that 32 bit version of java and install a 64 bit version of java. Alternatively there are extra options to tell the 32 bit version of java to use larger stacks, but everything is 64 bits now so upgrading to 64 bit should be the better solution. Last edited by KevinH; 03-21-2025 at 12:18 PM. |
![]() |
![]() |
![]() |
#537 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,725
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
You either change the following setting: Code:
"is32bit": false
Code:
"is32bit": true
or you could simply uninstall the current Java version and install the latest 64bit Java version. |
|
![]() |
![]() |
![]() |
#538 | |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Mar 2025
Device: Kobo
|
Quote:
|
|
![]() |
![]() |
![]() |
#539 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,921
Karma: 168959602
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
I was noticing that epubcheck in Sigil does not offer me the update to 5.2.1 which fixes the regression that was flagging mailto: links as errors. I manually installed it back in January and didn't think about it until now when I did a new Sigil install on a virtual machine and got a mailto: error on the first epub I checked. calibre's editor did suggest the update.
Update check is true in the prefs file and last_time_checked shows as about 5 minutes ago when I last ran epubcheck. |
![]() |
![]() |
![]() |
#540 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,725
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
I just replaced the EPUBCheck files in the plugin folder with the EPUBCheck v5.1.0 files and changed the year of last_time_checked to: Code:
"last_time_checked": "2024-04-19 14:28:46.465902", BTW, you can always force an upgrade by deleting the lib folder in the plugin folder. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Plugin] PunctuationSmarten Sigil plugin | DiapDealer | Plugins | 138 | 07-11-2023 11:22 AM |
[Plugin] KindleImport Sigil plugin | DiapDealer | Plugins | 187 | 07-04-2022 10:11 AM |
Sigil Plugin Index | Thasaidon | Plugins | 0 | 10-04-2014 07:41 AM |
FC and Sigil 0.5.3 ePUBcheck failure | Hitch | Sigil | 32 | 04-17-2012 02:56 AM |
Web-based epubcheck upgraded to epubcheck 1.0.5 | kjk | ePub | 4 | 02-09-2010 09:53 PM |