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 05-29-2024, 05:18 AM   #511
Chang
Connoisseur
Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!Chang is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!
 
Posts: 92
Karma: 50000
Join Date: Oct 2009
Device: none
Quote:
Originally Posted by Doitsu View Post
I've updated the plugin again and attached the latest version.
Thank you a lot! Seems to be working like a charm
Chang is offline   Reply With Quote
Old 06-26-2024, 11:19 PM   #512
byword
Junior Member
byword began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2022
Device: Onyx Leaf 3
Error in specific language

Hi~

I found that the below error occurs in a folder where the user name is Korean. I tested Windows 10 and 11.

Status: failed
Running EPUBCheck 5.1.0... please wait.
An exception of type UnicodeDecodeError occurred.

For example, an error occurs in a folder written in Korean as shown below.

C:\Users\한국어\AppData\Local\sigil-ebook\sigil\plugins\EpubCheck

It is thought that similar errors will occur not only in Korean but also in other foreign languages.

Please check to see if this problem can be resolved.

I am always grateful for your efforts.
Thanks.
byword is offline   Reply With Quote
Advert
Old 06-27-2024, 05:12 AM   #513
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,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by byword View Post
I found that the below error occurs in a folder where the user name is Korean. I tested Windows 10 and 11.
I'll try to fix this in the next version, but this will take a couple of weeks.

In the meantime please try the following:

Locate the following lines in plugin.py:

Code:
        stdout = result[0].decode("utf-8")
        stderr = result[1].decode("utf-8")
and change them to:

Code:
        stdout = result[0].decode("utf-8", "ignore")
        stderr = result[1].decode("utf-8", "ignore")
If you can't get it to work, download Pagina Epubchecker.
Doitsu is offline   Reply With Quote
Old 07-22-2024, 07:24 AM   #514
Astroman
Junior Member
Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.
 
Posts: 9
Karma: 11018
Join Date: Feb 2024
Device: none
Question Is installing a JDK also necessary?

I'm nearing the end of my first big e-book project, so I thought it would be a good idea to use the EpubCheck plugin. When running it, I get the same error message every time.

I followed the installation instructions in the first post, made sure I had Python (version 2.7.16), and downloaded Java (version 8 update 421) from Oracle's website and successfully installed it on my old MacBook Air running macOS Catalina. Adding the EpubCheck plugin (version 0.4.7.1) to Sigil was a very quick and easy process.

When running EpubCheck, I get the following output (see below) with an error message at the end ("Error: Expecting value: line 1 column 1 (char 0)") plus a pop-up window saying "To use the java command-line tool you need to install a JDK".

The instructions do not mention anything about installing other software packages except Java. Does the error message mean that I also need to install a JDK? If so, are there several so-called JDKs to choose from?

Output from EpubCheck:

Code:
Running EPUBCheck 5.1.0... please wait.
Traceback (most recent call last):
  File "/Applications/Sigil.app/Contents/plugin_launchers/python/launcher.py", line 142, in launch
    self.exitcode = target_script.run(container)
  File "/Users/jan-erik/Library/Application Support/sigil-ebook/sigil/plugins/EpubCheck/plugin.py", line 557, in run
    parsed_json = json.loads(stdout)
  File "json/__init__.py", line 346, in loads
  File "json/decoder.py", line 337, in decode
  File "json/decoder.py", line 355, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Error: Expecting value: line 1 column 1 (char 0)
Astroman is offline   Reply With Quote
Old 07-22-2024, 09:17 AM   #515
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,160
Karma: 5450818
Join Date: Nov 2009
Device: many
I have no idea if this is related or not but Python version 2.7.16 is very very out of date.

Python moved to Python 3 (now at Python 3.9 or higher) almost exclusively and Sigil followed. So when running epubcheck, you should be using Sigil's built in Python (ie. check the box to use Sigil's internal Python on macOS). And yes a Java virtual machine is needed. At least the JRE, but on macOS I strongly recommend the full JDK as it is the only one that properly sets the proper path for you.
KevinH is offline   Reply With Quote
Advert
Old 07-22-2024, 01:57 PM   #516
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,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Astroman View Post
When running EpubCheck, I get the following output (see below) with an error message at the end ("Error: Expecting value: line 1 column 1 (char 0)") plus a pop-up window saying [/I].
The plugin runs EPUBCheck in JSON mode. If you got this message, either no JSON file was generated at all or the JSON file was invalid, which is relatively rare. You also might want to use the Python 3 interpreter that comes with Sigil.
(I only mentioned Python 2, because some Sigil users are still using very old Sigil versions.)

Quote:
Originally Posted by Astroman View Post
plus a pop-up window saying "To use the java command-line tool you need to install a JDK".
That is a macOS error message. It looks like you'll have to install a JDK.
Doitsu is offline   Reply With Quote
Old 07-22-2024, 02:26 PM   #517
Astroman
Junior Member
Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.
 
Posts: 9
Karma: 11018
Join Date: Feb 2024
Device: none
Question

Thanks for the info! Yes, I'm using Sigil's built-in Python. I installed JDK as well, and got EpubCheck working … although I'm not sure it's working 100%.

I have yet to add images to my EPUB (version 3), but the text is 99% finished. I was quite happy to see that EpubCheck only had one type of complaint:

"Col: 10: ERROR(RSC-005): Error while parsing file: Element "title" must not be empty."

This exact line was repeated 25 times, i.e. the same error in 25 different chapters/xhtml files. The reason is the empty title tag, i.e. <title></title>, in the <head> element at the beginning of each file.

I have two questions:

1) I only use the h1 tag for chapter titles. I read a lot of guides and tips before I started producing this EPUB, and I've never read anything about the title tag. I have searched on Google, but I can't find any relevant information (except for the "title" that refers to the title of the book, which is added to the metadata).

What is the title tag for? EpubCheck lists these errors in red colour, so I assume it's serious and must be fixed.

I checked the Sigil User Guide, and often the title tag contains the same text as the h1 or h2 heading, but sometimes it's completely different. E.g. the chapter called "External Editors" has "Files" in the title tag. I'm confused.

PS: I have added my book's title to the metadata using the Metadata Editor, but I assume the book's title is not related to the title tag that appears near the top of every single chapter/xhtml file?

2) EpubCheck lists the above-mentioned error only for 25 chapters. However, all of my approximately 80 chapters have empty title tags.

Why is EpubCheck only reporting this error for less than 1/3 of the chapters?

PS: There is one file that has something written in the title tag: the file nav.xhtml has "ePub NAV" in the title, which I believe is something Sigil inserts automatically.
Astroman is offline   Reply With Quote
Old 07-22-2024, 03:34 PM   #518
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,160
Karma: 5450818
Join Date: Nov 2009
Device: many
Title tags in head are not seen be normal viewers of your epub. That said, when people are blind or have vision issues, they often use Accessibility software to help them navigate the page. This Accessibility software does use these title tags to help identify where in the book they are.

I personally fill them in with the Chapter title or short chapter description.

Last edited by KevinH; 07-22-2024 at 04:51 PM.
KevinH is offline   Reply With Quote
Old 07-22-2024, 05:01 PM   #519
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,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Astroman View Post
This exact line was repeated 25 times, i.e. the same error in 25 different chapters/xhtml files. The reason is the empty title tag, i.e. <title></title>, in the <head> element at the beginning of 2) EpubCheck lists the above-mentioned error only for 25 chapters. However, all of my approximately 80 chapters have empty title tags.

Why is EpubCheck only reporting this error for less than 1/3 of the chapters?
That's a limitation of the JSON output code. It'll only report the first 25 occurrences of frequently occurring problems.
I don't know why the EPUBCheck devs decided to implement this "feature."
Doitsu is offline   Reply With Quote
Old 07-22-2024, 05:59 PM   #520
Astroman
Junior Member
Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.Astroman can tame squirrels without the assistance of a chair or a whip.
 
Posts: 9
Karma: 11018
Join Date: Feb 2024
Device: none
Thumbs up

Thank you, KevinH and Doitsu, for your quick and helpful replies!
Astroman is offline   Reply With Quote
Old 10-04-2024, 10:42 AM   #521
philja
Groupie
philja began at the beginning.
 
Posts: 177
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6
In the thread about Sigil's error messages, I said I was surprised that a single mismatched quote in a class identifier caused the EpubCheck plugin to record numerous errors related to "unidentified fragments" in the HTML Contents and the NCX files. Errors which vanished once the original mismatched quote was corrected. BeckyEbook explained this in a reply:
https://www.mobileread.com/forums/sh...9&postcount=19.

I recently saw another example where an accidentally erased '<' at the end of an early paragraph in one of the files caused EpubCheck to produce 26 error statements for that file, none of which was the actual error.

If the plugin identifies an error in a chapter, the user has to rerun the plugin after correcting the error so the validation process is always likely to involve several iterations of the use of epubcheck.

To avoid the listing of numerous non-errors, would it be possible for the plugin to log the first error and then exit that file and progress to the next file?

Just a thought from a comparatively non-techie user.
philja is offline   Reply With Quote
Old 10-04-2024, 11:42 AM   #522
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,160
Karma: 5450818
Join Date: Nov 2009
Device: many
Actually FWIW, I like it the way it works now... just like a compiler reports every error, even though some are ripples caused by the first. Fixing the first and lookng at the second and so on. In the cases where multiple independent erros exist, this is much faster.
KevinH is offline   Reply With Quote
Old 10-04-2024, 12:30 PM   #523
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,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by philja View Post
To avoid the listing of numerous non-errors, would it be possible for the plugin to log the first error and then exit that file and progress to the next file?
Unfortunately, this can't be easily done. All the plugin does is generate a temporary EPUB file, verify it using EPUBCheck, and then reformat the JSON output from EPUBCheck for display in the Validation Results window.
Doitsu is offline   Reply With Quote
Old 10-04-2024, 02:43 PM   #524
philja
Groupie
philja began at the beginning.
 
Posts: 177
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6
Quote:
Originally Posted by KevinH View Post
Actually FWIW, I like it the way it works now... just like a compiler reports every error, even though some are ripples caused by the first. Fixing the first and looking at the second and so on. In the cases where multiple independent errors exist, this is much faster.
I understand your point of view. But, one could spend a lot of time trying to understand what is wrong with the 'non-errors' without fixing anything because they were not the problem.

Quote:
Originally Posted by Doitsu
Unfortunately, this can't be easily done. All the plugin does is generate a temporary EPUB file, verify it using EPUBCheck, and then reformat the JSON output from EPUBCheck for display in the Validation Results window.
.

Sad - but there you go, life's like that. It was just an idea.
philja is offline   Reply With Quote
Old 10-06-2024, 07:18 PM   #525
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 697
Karma: 150000
Join Date: Feb 2010
Device: none
Well, forgive an old man for intruding into this thread, but man o man! does this remind me of my early days of programming Algol on a B5500, where we ran informal contests to see who could generate the most compiler error messages with a single typo. (hint: try omitting the final ";" on a statement, or the "end;" of a "for" loop).

Turns out it was good practice for detecting such errors in the wild. You had to think like the compiler when it was parsing the statements to see where it jumped the rails.

Albert
st_albert is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] PunctuationSmarten Sigil plugin DiapDealer Plugins 138 07-11-2023 12:22 PM
[Plugin] KindleImport Sigil plugin DiapDealer Plugins 187 07-04-2022 11:11 AM
Sigil Plugin Index Thasaidon Plugins 0 10-04-2014 08:41 AM
FC and Sigil 0.5.3 ePUBcheck failure Hitch Sigil 32 04-17-2012 03:56 AM
Web-based epubcheck upgraded to epubcheck 1.0.5 kjk ePub 4 02-09-2010 10:53 PM


All times are GMT -4. The time now is 05:21 AM.


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