Register Guidelines E-Books Search Today's Posts Mark Forums Read

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,670
Karma: 23468403
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: 78,386
Karma: 142887248
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,670
Karma: 23468403
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: 78,386
Karma: 142887248
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: 43,337
Karma: 165170674
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, 59 views)
Morea is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epubcheck plugin for Sigil Doitsu Plugins 533 10-24-2024 03:32 PM
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 11:22 PM.


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