Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-19-2025, 03:30 AM   #196
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,680
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
Exclamation Please stop posting off-topic messages!

This thread is not intended for discussing the pros and cons of using EPUBCheck or best practices.

@ryder please ask questions about best practices in the ePub forum.

I'll ask the mods to hide future posts that are not about installing or using the Calibre EPUBCheck plugin.

Last edited by Doitsu; 01-19-2025 at 03:32 AM.
Doitsu is offline   Reply With Quote
Old 03-03-2025, 10:31 AM   #197
Morea
Junior Member
Morea began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Sep 2021
Device: none
Hello!

I get an error message when starting this plugin:

Quote:
Traceback (most recent call last):
File "calibre_plugins.epub_check.main", line 387, in ask_user
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 28: invalid start byte
The version of Calibre doesn't matter. I uninstalled and reinstalled the plugin with the same result.

Hope you can help.

Morea
Morea is offline   Reply With Quote
Advert
Old 03-03-2025, 10:36 AM   #198
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,047
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Morea View Post
Hello!

I get an error message when starting this plugin:



The version of Calibre doesn't matter. I uninstalled and reinstalled the plugin with the same result.

Hope you can help.

Morea
Are you using the latest 64-bit version of Java? If it's any 32-bit version of Java, then you will have a problem.
JSWolf is offline   Reply With Quote
Old 03-03-2025, 11:25 AM   #199
Morea
Junior Member
Morea began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Sep 2021
Device: none
Quote:
Originally Posted by JSWolf View Post
Are you using the latest 64-bit version of Java? If it's any 32-bit version of Java, then you will have a problem.
Yes, I am using OpenJDK Runtime Environment Temurin-21.0.5+11 (build 21.0.5+11-LTS) 64 bit.

BUT the user settings of my Calibre installation come from an older installation of Calibre - and perhaps that was a 32-bit installation...
Morea is offline   Reply With Quote
Old 03-03-2025, 02:41 PM   #200
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,680
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Morea View Post
I get an error message when starting this plugin
The error message is usually displayed because EPUBCheck generated invalid UTF-8 output. This usually happens if the epub file contains files that aren't valid UTF-8 files.

To fix this problem:
  • uninstall the plugin
  • re-download the plugin if you didn't save it
  • extract main.py from the zip file
  • search for and change the following two lines:
    Code:
                stdout = result[0].decode('utf-8')
                stderr = result[1].decode('utf-8')
    to:
    Code:
                stdout = result[0].decode('utf-8', errors='ignore')
                stderr = result[1].decode('utf-8', errors='ignore')
  • replace main.py in the zip file with the modified version
  • re-install the plugin from the .zip file
If you're getting more Python errors, open the book with Calibre Editor, select Tools > Fix HTML - all files followed by Tools > Beautify all files, save the epub and re-run the EpubCheck plugin.
Doitsu is offline   Reply With Quote
Advert
Old 03-03-2025, 03:15 PM   #201
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,047
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Doitsu View Post
The error message is usually displayed because EPUBCheck generated invalid UTF-8 output. This usually happens if the epub file contains files that aren't valid UTF-8 files.

To fix this problem:
  • uninstall the plugin
  • re-download the plugin if you didn't save it
  • extract main.py from the zip file
  • search for and change the following two lines:
    Code:
                stdout = result[0].decode('utf-8')
                stderr = result[1].decode('utf-8')
    to:
    Code:
                stdout = result[0].decode('utf-8', errors='ignore')
                stderr = result[1].decode('utf-8', errors='ignore')
  • replace main.py in the zip file with the modified version
  • re-install the plugin from the .zip file
If you're getting more Python errors, open the book with Calibre Editor, select Tools > Fix HTML - all files followed by Tools > Beautify all files, save the epub and re-run the EpubCheck plugin.
Does this mean there will be a new version?
JSWolf is offline   Reply With Quote
Old 03-04-2025, 01:39 AM   #202
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: 44,695
Karma: 168431851
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Personally, if I get an error message indicating that an ePub files contains encoding that is not UTF-8 or UTF-16 (I've seen 2 ePubs in my entire involvement with ereading that were UTF-16 encoded), that ePub is not standards compliant and should be fixed. As section 3.9 of the ePub 3.3 recommendation states:
Quote:
MUST be encoded in UTF-8 or UTF-16 [unicode], with UTF-8 as the RECOMMENDED encoding.
While the ePub 2.0.1 Open Publication Structure document 1.4.1.2 states:
Quote:
A conformant XHTML Content Document must meet these conditions:
it is a well-formed XML document (as defined by XML 1.0); and
it is encoded in UTF-8 or UTF-16; and
I will admit that I have seen several ePubs where the creator did not use UTF-8 or UTF-16 but again, they are not standards compliant and were often the result of an amateur converting book formats or converting an OCR scan of a pbook to an ePub document.

Last edited by DNSB; 03-04-2025 at 01:46 AM.
DNSB is offline   Reply With Quote
Old 03-04-2025, 02:54 AM   #203
Morea
Junior Member
Morea began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Sep 2021
Device: none
Quote:
open the book with Calibre Editor, select Tools > Fix HTML - all files followed by Tools > Beautify all files, save the epub and re-run the EpubCheck plugin.
This didn't help, and it could not, since this problem even occurs with books that I know to be 100% error-free.

I did not try to fix the plugin's main.py, since I used the epubcheck plugin in the version 4.26 for some years and never got such a crash. I suppose there is something new in Windows 11 that was no problem in Windows 10 all these years...
Morea is offline   Reply With Quote
Old 03-04-2025, 05:09 AM   #204
Morea
Junior Member
Morea began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Sep 2021
Device: none
Fix

Now I fixed the plugin's main.py as you described and: yes! It works like charm, with the old 4.26 epubcheck version and the new 5.12 one!

This is the fixed zip:
https://www.mobileread.com/forums/at...1&d=1741082768

Thank you!
Attached Files
File Type: zip Calibre EpubCheck 0.2.5_fixed_main.py_C2CBF9A9.zip (8.9 KB, 163 views)
Morea is offline   Reply With Quote
Old 05-01-2025, 07:19 PM   #205
rumplestiltskin
Zealot
rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.
 
Posts: 100
Karma: 1435120
Join Date: Nov 2010
Location: West of the Pecos
Device: FireHD8, iPad
Getting a really strange error window when I run EpubCheck; way beyond my pay grade. Seems to be the same error with any ePub I open with the Edit command and then run the EpubCheck.

rumplestiltskin is offline   Reply With Quote
Old 05-01-2025, 08:17 PM   #206
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: 44,695
Karma: 168431851
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Rather odd. What version of Java are you running? If you are running a 64 bit version of Java, you could try modifying the main.py file in the EPUBCHECK directory by modifying the 64 bit command line parameters line to read:

Code:
            # define epubcheck command line parameters
            if is32bit:
                args = [java_path, '-Dfile.encoding=UTF8', '-Xss1024k', '-jar', epc_path, '--version']
            else:
                args = [java_path, '-Dfile.encoding=UTF8', '-Xss2048k', '-jar', epc_path, '--version']
I will have to say that running a 64bit Java, I only found 1 time when I got a stack overflow error and that was a omnibus document that to put it mildly was poorly constructed. OTOH, it reported over 1000 errors not the no errors which your case seems to show. OTOH, neither does your image show the version of epubcheck being used.

Last edited by DNSB; 05-01-2025 at 08:22 PM.
DNSB is offline   Reply With Quote
Old 05-02-2025, 12:56 AM   #207
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,680
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
There's no need to modify the source code. Simply change the is32bit parameter in the EpubCheck.json file to true.

Code:
  "is32bit": true,
Or simply uninstall Java and install the latest 64 bit Java version.
Doitsu is offline   Reply With Quote
Old 05-02-2025, 02:38 AM   #208
rumplestiltskin
Zealot
rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.
 
Posts: 100
Karma: 1435120
Join Date: Nov 2010
Location: West of the Pecos
Device: FireHD8, iPad
Will try the fix(es) suggested in the morning. I'm writing this from another computer and EpubCheck is working correctly (once I installed the 64-bit Java - this machine actually didn't have -any- Java installed).

I did get a message about installing a new version of EpubCheck but, when I had Calibre check for one, it didn't do anything. I believe I have 4.26 installed.

I'll advise tomorrow afternoon how it all goes.

Thank you!
rumplestiltskin is offline   Reply With Quote
Old 05-02-2025, 08:09 PM   #209
rumplestiltskin
Zealot
rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.rumplestiltskin ought to be getting tired of karma fortunes by now.
 
Posts: 100
Karma: 1435120
Join Date: Nov 2010
Location: West of the Pecos
Device: FireHD8, iPad
My installed Java (on the machine displaying the stackOverflow) was v8 161 (which I do not believe was ID'd as 64-bit). I DL'd the new Java installer and it removed the old version and installed v8 451 which -is- 64-bit.

The EpubCheck ran without any Java errors and all seems to be fine. Again, thanks for the advice.
rumplestiltskin is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epubcheck plugin for Sigil Doitsu Plugins 539 04-19-2025 08:45 AM
Open Metadata Editor from plugin notbuu Development 5 10-05-2016 12:10 AM
Sample Plugin for the Editor DiapDealer Editor 77 12-10-2014 07:16 AM
Editor plugin question DiapDealer Development 2 07-28-2014 10:23 PM
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 04:21 PM.


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