![]() |
#316 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,837
Karma: 6120478
Join Date: Nov 2009
Device: many
|
Quote:
https://github.com/JayPanoz/epubchec...-messages.json Last edited by KevinH; 07-30-2020 at 12:25 PM. |
|
![]() |
![]() |
![]() |
#317 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,094
Karma: 91592869
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#318 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 270
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
Status: failed Running EPUBCheck v4.2.4... please wait. Traceback (most recent call last): File "/usr/share/sigil/plugin_launchers/python/launcher.py", line 135, in launch self.exitcode = target_script.run(container) File "/home/pnj/.local/share/sigil-ebook/sigil/plugins/EpubCheck/plugin.py", line 632, in run if offlst != [0] and linenumber: UnboundLocalError: local variable 'offlst' referenced before assignment Error: local variable 'offlst' referenced before assignment I had that error show earlier today when I'm pretty sure that usage was set to false but later on, it worked ok until I set it back to true to recheck that lang setting. I haven't touched either of the two files mentioned in the error - so I don't understand what's happening. Does Sigil need some sort of 'HUP' after modifying the EpubCheck.json file? I did try closing out of Sigil and reloading the epub file but that hasn't changed anything. |
|
![]() |
![]() |
![]() |
#319 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 270
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
|
|
![]() |
![]() |
![]() |
#320 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,736
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
This is definitely a bug. If you send me the download link for the file in a private message, I can try to fix it.
|
![]() |
![]() |
![]() |
#321 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 270
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
|
![]() |
![]() |
![]() |
#322 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,736
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
|
![]() |
![]() |
![]() |
#323 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 270
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
Then the next file produced that error message in my post above. I thought there must be some significant difference between this file and the previous eight. I went back to those previous eight files and they too then produced the error message. Now every file I try produces that error message when 'usage: true' is set. That confirms what I thought about yesterday's and this morning's performance: that I had successfully used the plugin with 'usage: true'. It appears that for a while, all works correctly, and then after several files (or after a certain interval?) nothing works correctly. The 'fault' lies elsewhere than in the epub files. I have tried removing the plugin and reinstalling from the download zip in the first post to this thread. I removed the json preferences file which caused the new installation of the plugin to go check and download an update (as it did yesterday, too). The results were the same: nothing worked with 'usage: true'. I shut down Sigil for about an hour and then came back and read your reply so went looking for a 'bad' file and the results are in my first para above. So.... I'm using UbuntuStudio 18.04 (waiting for 20.04.1 to come out any day soon). Is it a consequence of my OS? Is some 'garbage' building up somewhere after repetitive use of the plugin? Remember how Windows95 used to run out of memory after opening and closing a couple of applications - and then failed with the BSOD? I have checked that when I close Sigil, the process is killed and when I open another file, Sigil starts with a new process. Last edited by philja; 07-30-2020 at 04:40 PM. Reason: small correction |
|
![]() |
![]() |
![]() |
#324 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,837
Karma: 6120478
Join Date: Nov 2009
Device: many
|
Probably a uninitialized variable of some sort. Perhaps "usage" messages do not provide line and column info or the line col table to offset map is not being initialized. Hard to see without seeing how the epubcheck usage error differs from a warning or an error.
|
![]() |
![]() |
![]() |
#325 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,564
Karma: 169115148
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
For what it's worth, on a Windows 10 x64 and a Mac OSX Catalina VM, there does not seem to be an issue with toggling usage. Though when I have it set to true, I'm reminded as to why I turned it on out of curiosity and immediately turned it back off.
|
![]() |
![]() |
![]() |
#326 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,837
Karma: 6120478
Join Date: Nov 2009
Device: many
|
Maybe a platform specific python or java issue?
Actually from eyeballing the comments in plugin.py, Usage errors do not set a filename (sometimes?) and if they happen first (before any other error in that file) then offlst will not get initialized resulting in the error message you got (a guess on my part). Simply setting offlst to [0] right where lastfilename is first set to None might help but I have no computer to test that with. Last edited by KevinH; 07-30-2020 at 09:57 PM. |
![]() |
![]() |
![]() |
#327 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,736
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
IIRC, there's an EPUBCheck usage bug. Sometimes it reports usage suggestions without file names and that probably triggers the problem. I'll try to adapt the code to handle this bug. @philja try enabling the clipboard copy function in the JSON file and post the raw EPUBCheck output the next time this happens. |
|
![]() |
![]() |
![]() |
#328 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 270
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
I then set the clipboard copy to true and tried again. On two different files, it still threw the error but each time, nothing was written to the clipboard. Trying to paste to a text editor just showed that there was nothing in history to paste. edit: sorry this is my fault. When the plugin runner threw the error notification, I clicked on OK and closed the dialogue. This must have cleared the clipboard (although trying to paste from history indicated "no clipboard data". I just tried again and this time I left the plugin runner dialogue 'as is' with the error announced and tried to paste to clipboard. I got a packet of stuff this time. Curiously, the plugin run seems to be listed twice each time finding 62 usages (inline style declarations, an unused CSS decaration, missing lang attributes). At line 68, it announces EPUBcheck completed and then at line 69, EPUBCheck v4.2.4 -- and off we go again. The difference between the first listing of the 62 usages and the second is that every line of the second listing includes a long PATH to a temp.epub file in the plugin directory : Here is an example : line 8: USAGE(ACC-013):OEBPS/Text/chapter.xhtml(12,36): Content file contains at least one inline style declaration. line 76: USAGE(ACC-013): /home/pnj/.local/share/sigil-ebook/sigil/plugins/EpubCheck/temp.epub/OEBPS/Text/chapter.xhtml(12,36): Content file contains at least one inline style declaration. These two lines refer to the same usage in the same chapter. What do you make of this ? I can supply the whole file if you tell me how to attach it in the forum. Last edited by philja; 07-31-2020 at 01:17 PM. |
|
![]() |
![]() |
![]() |
#329 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,736
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Also, try to manually check the same file in a terminal using the following command: Code:
java -jar epubcheck.jar mybook.epub Quote:
It's also possible that the book simply didn't contain any errors. No. |
||
![]() |
![]() |
![]() |
#330 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 270
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Hi Doitsu
I think you may have replied while I was editing my last post - and missed the fact that I got a listing from the clipboard. My thoughts about closing the dialogue box having wiped the clipboard have not been confirmed by later trials which produced nothing from the clipboard despite leaving the dialogue open. The error can occurr with any of my epub files but just occasionally the epubcheck plugin does complete with usage set to true but it can happen with any file - nothing file related is 100% repeatable except when usage is set to false. I just manually checked a file which had just failed on the sigil plugin check. This gave the following -- pnj@Osiris:~/Documents/Regency-Romance/Stories/Catherine James/e-versions/D2D-version$1 java -jar /home/pnj/.local/share/sigil-ebook/sigil/plugins/EpubCheck/epubcheck.jar The-unhappyfile-v2.epub Validating using EPUB version 2.0.1 rules. No errors or warnings detected. Messages: 0 fatals / 0 errors / 0 warnings / 0 infos From which you will note that it completed successfully with no 'usages' noted, although usage is set to true. Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Plugin] PunctuationSmarten Sigil plugin | DiapDealer | Plugins | 143 | 07-30-2025 06:58 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 |