|
|
#1 |
|
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 461
Karma: 100100
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Bug in validation results display in 2.8.6
I had a strange error appear when running a check with EpubCheck plugin on a previously 'perfect' epub3 file. In my linux machimne using AppImage 2.8.6.
A rapid check shows that it happens as well on Windows 11, Sigil 2.8.6 and on my MacBook, also at 2.8.6. What I had done was change a back-matter file by deleting the old and inserting the new in the form of an updated file used in a series of books. I have done this dozens of times without problems. After inserting the new file, there are always some internal links to update because the new file's anchor id's are not always the same as the fragments in the older files which link to the new. I habitually run EpubCheck and geta load of pink errors in the Validation pane and these are about missing fragments. A click on the line in the validation pane takes me to the file and line concerned where the edit needed can immediately be made. Yesterday, the first time with the new linux, I ran EpubCheck and it seemed to indicate success in the plugin runner but then a pop-up dialog appeared : see attached screenshot. When I deleted the little pop-up, the expected error messages appeared in the plugin runner window but not in the validation window. This seems to indicate a problem in Sigil rather than in the plugin, I would guess. I have today managed to replicate this problem by a simple edit to break the link fragments. If there are 6 or fewer of these fragment errors, the results display correctly in the validation pane. But with 7 or more 'corrupted' fragments, the little pop-up appears to complain about 'expecting ';' but got ''''. Last edited by philja; Yesterday at 08:17 AM. Reason: Confirm on W11 and Mac |
|
|
|
|
|
#2 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,957
Karma: 212736643
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
In almost all cases, that error is a problem with the plugin. The plugin is failing before its results have successfully been reported to Sigil. I won't rule out a problem with Sigil, but it's more likely your plugin updated and behavior changed. Remember when others were having problems with epubcheck when it was trying to update to a mystery version, yet you were reporting no issues?
The epub errors being reported in the plugin runner window are that which were provided by python as a result of the plugin run. The "Success" message is simply that the plugin returned no error code. That does not mean the errors to report back to Sigil were not malformed in some way. Last edited by DiapDealer; Yesterday at 08:35 AM. |
|
|
|
|
|
#3 |
|
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 461
Karma: 100100
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
OK. You're better placed than me to judge where the likely problem lies.
I do remember that I didn't get a problem with that funny name. But as soon as Doitsu posted the update, to 0.4.8, I applied it to all my machines. I have made several of those file exchange updates since, without trouble until this week. Should this thread be transferred to the plugin forum? |
|
|
|
|
|
#4 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,244
Karma: 7640012
Join Date: Nov 2009
Device: many
|
That means that after 6 error messages, the seventh seems to trigger unexpected output from actual epubcheck that is confusing the plugin so much that it is failing in an unexpected way.
The easiest way to track down what output epupcheck is generating that its plugin can not handle is to run epubcheck from the command line with the exact same options theplugin uses and show the output. That way we can figure out how to adapt the plugin's code to handle that case. Or if it is easier, it would help if you could post the simplest test case epub that illustrates this problem and I would be happy to take a look. Just in case it is a Sigil problem. |
|
|
|
|
|
#5 | |
|
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 461
Karma: 100100
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
I have replicated my steps with another copy of the original file (which checked out ok using epubcheck plugin) - swapped the template file without correcting any internal links. The problem is there. I don't want to post the file in the forum but would be happy to PM you a link to pick it up. What do you think? |
|
|
|
|
|
|
#6 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,244
Karma: 7640012
Join Date: Nov 2009
Device: many
|
Happy to debug what is going on. You can pm me KevinH here or you could try running the borkify plugin to prevent any copyright loss and post that version.
Either way I am happy to help. |
|
|
|
|
|
#7 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,957
Karma: 212736643
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
It's possible all of the recent changes to epubcheck have introduced some new errors/warnings that are rare enough that they hasn't tripped up Doitu's plugin until now.
|
|
|
|
|
|
#8 |
|
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 461
Karma: 100100
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
|
|
|
|
|
|
#9 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,244
Karma: 7640012
Join Date: Nov 2009
Device: many
|
FWIW,
I am seeing the exact same errors/messages you are. Something is killing the epubcheck plugin subprocess before it gets a chance to actually send it results. No idea what is going on yet. Debug print statements all print but something is killing the plugin process just instants early. I will try to run this inside lldb to see if it detects anything funny. Very very strange! |
|
|
|
|
|
#10 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,244
Karma: 7640012
Join Date: Nov 2009
Device: many
|
@philja
An & in a file name is freaking out the parsing of the epubcheck results. Please try removing that & in your file name. I think since these are urls, the proper way to handle that & in a file name being returned from epubcheck is to have it % encoded. I think it should be %26 to replace the & just like it is shown in the OPF manifest. But this is a grey area in that it is a url and technically also a file path. Last edited by KevinH; Yesterday at 06:26 PM. |
|
|
|
|
|
#11 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,957
Karma: 212736643
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
And yet not all epubs are failing in this way, right?
|
|
|
|
|
|
#12 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,244
Karma: 7640012
Join Date: Nov 2009
Device: many
|
No, it was just that the error happened in that specific file (it used a fragment that did not exist) plus the fact it has the & in the filename.
The result xml passed back from the wrapper to the launcher did not encode or escape that bookpath. That freaked out the plugin runner's QXmlStreamReader badly. I have decided to handle that for all validation plugins from Sigil's end to prevent issues. I have a fix for this already. After I test it a bunch, I will push it to master probably tonight. Last edited by KevinH; Yesterday at 06:55 PM. |
|
|
|
|
|
#13 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,093
Karma: 4000129
Join Date: Jan 2017
Location: Poland
Device: Various
|
I have a simple test for this issue:
1. Create an empty EPUB3 file (by default, it will contain <title></title>, which is enough to cause an error in EpubCheck). 2. Rename Section0001.xhtml to Section&0001.xhtml 3. Run the EpubCheck plugin |
|
|
|
|
|
#14 | |
|
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 461
Karma: 100100
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
Substituting %26 in the file name (as you found in the OPF manifest) causes other errors (and the manifest entry adds %25 to the %26). This is not the first time I've run epubccheck on this epub with that filename. But it could be the first time I swapped out the backmatter chapter in that book since renaming all the files from the generic Section000n.xhtml names they had for many years. And hence, the first time epubcheck encountered the combination of a file name having an '&' together with the file having a fragment error. Dumping the '&' from the filename is easy and won't cause any consequential problem. I can't check that this evening, but I'll get back on it in the morning when I get back to my linux box. Last edited by philja; Yesterday at 07:25 PM. Reason: Decided to dump thje '&' from the filename |
|
|
|
|
|
|
#15 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,244
Karma: 7640012
Join Date: Nov 2009
Device: many
|
I have just pushed a fix for this to Sigil master. Sigil now handles urlencoding validation bookpaths in the plugin launcher and urldecoding them inside the PluginRunner code.
This fix will be in the next release of Sigil. |
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can I display only search results? | gvantass | Library Management | 5 | 08-08-2026 08:59 PM |
| Request: Change to Validation Results window title | mrprobert | Sigil | 5 | 08-18-2024 06:21 AM |
| What order does FTS display results in? | ownedbycats | Library Management | 1 | 10-26-2022 12:28 AM |
| [Likebook Mimas and Muses] Notes app BUG that results in a loss of page data | MustardOrMayo | Boyue | 4 | 04-04-2019 10:02 AM |
| Validation Results. So Many Errors!! | mont555 | Sigil | 12 | 01-18-2013 08:04 PM |