Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 07-30-2020, 12:23 PM   #316
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: 8,837
Karma: 6120478
Join Date: Nov 2009
Device: many
Quote:
I was hoping for a quick lead to the source documentation which listed all these 'events' like CSS-024.
Here is the only link to the full list of messages I found outside the epubcheck java source code:

https://github.com/JayPanoz/epubchec...-messages.json

Last edited by KevinH; 07-30-2020 at 12:25 PM.
KevinH is online now   Reply With Quote
Old 07-30-2020, 12:31 PM   #317
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 7,094
Karma: 91592869
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by exaltedwombat View Post
There's two possible items, lang and xml:lang. Epubcheck only seems to like one of them.
The recommendation on this topic from the Daisy Accessible Publishing Knowledge Base is:

Quote:
Is it necessary to specify both the lang and xml:lang attributes?

For optimal accessibility both should be specified when creating XHTML content. Assistive technologies may only recognize one or the other attribute.

In addition, if XHTML documents are rendered as HTML by a user agent, only the lang attribute may be recognized.

The xml:lang attribute is not valid in HTML documents, only in XHTML.
jhowell is offline   Reply With Quote
Old 07-30-2020, 01:01 PM   #318
philja
Addict
philja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enough
 
Posts: 270
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
Quote:
Originally Posted by exaltedwombat View Post
There's two possible items, lang and xml:lang. Epubcheck only seems to like one of them.
I tried to modify and use just lang instead of xml:lang but now I'm having difficulty getting the epubcheck plugin to run with usage set to true. It fails with this error :

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.
philja is offline   Reply With Quote
Old 07-30-2020, 01:06 PM   #319
philja
Addict
philja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enough
 
Posts: 270
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
Quote:
Originally Posted by KevinH View Post
Here is the only link to the full list of messages I found outside the epubcheck java source code:

https://github.com/JayPanoz/epubchec...-messages.json
Thank you for this lead. I'll look it up.
philja is offline   Reply With Quote
Old 07-30-2020, 01:12 PM   #320
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,736
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by philja View Post
I tried to modify and use just lang instead of xml:lang but now I'm having difficulty getting the epubcheck plugin to run with usage set to true. It fails with this error :
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.
Doitsu is offline   Reply With Quote
Old 07-30-2020, 02:15 PM   #321
philja
Addict
philja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enough
 
Posts: 270
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
Quote:
Originally Posted by Doitsu View Post
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.
Which file do you need, Doitsu?
philja is offline   Reply With Quote
Old 07-30-2020, 03:12 PM   #322
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,736
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by philja View Post
Which file do you need, Doitsu?
Any epub that will produce the error that you reported.
(Note that you can't post commercial books on MR.)
Doitsu is offline   Reply With Quote
Old 07-30-2020, 04:37 PM   #323
philja
Addict
philja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enough
 
Posts: 270
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
Quote:
Originally Posted by Doitsu View Post
Any epub that will produce the error that you reported.
(Note that you can't post commercial books on MR.)
I'm afraid it's not so simple. After reading your reply, I was just looking for a file that displayed the error when 'usage' was set to 'true' and I ran through about 8 files that were all good and correctly displayed a number of 'less than ideal' features (not to call them epub errors).

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
philja is offline   Reply With Quote
Old 07-30-2020, 07:49 PM   #324
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: 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.
KevinH is online now   Reply With Quote
Old 07-30-2020, 08:43 PM   #325
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: 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.
DNSB is offline   Reply With Quote
Old 07-30-2020, 09:38 PM   #326
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: 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.
KevinH is online now   Reply With Quote
Old 07-31-2020, 12:57 AM   #327
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,736
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KevinH View Post
Simply setting offlst to [0] right where lastfilename is first set to None might help but I have no computer to test that with.
That's probably the best solution.

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.
Doitsu is offline   Reply With Quote
Old 07-31-2020, 12:56 PM   #328
philja
Addict
philja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enough
 
Posts: 270
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
Quote:
Originally Posted by Doitsu View Post
That's probably the best solution.
@philja try enabling the clipboard copy function in the JSON file and post the raw EPUBCheck output the next time this happens.
I was just able to get back to the computer this afternoon. Straight off, running epubcheck plugin with 'usage: true' (setting leftover from yesterday) threw the error.

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.
philja is offline   Reply With Quote
Old 07-31-2020, 01:15 PM   #329
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,736
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by philja View Post
I was just able to get back to the computer this afternoon. Straight off, running epubcheck plugin with 'usage: true' (setting leftover from yesterday) threw the error.
Does this happen with all files. If not, I need a file that reliably causes this bug. (I also have a Linux machine.)
Also, try to manually check the same file in a terminal using the following command:

Code:
java -jar epubcheck.jar mybook.epub
(Obviously, you'll need to add the required paths before the .jar and .epub files.

Quote:
Originally Posted by philja View Post
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.
For some odd reason the Python libary that is used for clipboard copies doesn't work with some Linux distros.
It's also possible that the book simply didn't contain any errors.

Quote:
Originally Posted by philja View Post
The plugin doesn't write a log file somewhere, I suppose?
No.
Doitsu is offline   Reply With Quote
Old 07-31-2020, 02:40 PM   #330
philja
Addict
philja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enough
 
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:
For some odd reason the Python libary that is used for clipboard copies doesn't work with some Linux distros.
It's also possible that the book simply didn't contain any errors.
After lots of trials, mostly I do not get any clipboard output when the error occurs - just one time, I did and that is in the edit on my previous post. Sorry, I should have posted that separately and not as an edit.
philja is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 08:55 AM.


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