Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-01-2025, 05:31 PM   #1
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: 80,415
Karma: 150249609
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
8.12 breaks from calibre.ebooks.oeb.parse_utils import RECOVER_PARSER

calibre 8.12 breaks
Code:
from calibre.ebooks.oeb.parse_utils import RECOVER_PARSER
and that means that all plugins that use this no longer work with 8.12. Can this be fixed in calibre? If not, what's the replacement code so these plugins will once again work?
JSWolf is offline   Reply With Quote
Old 10-01-2025, 08:20 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,558
Karma: 28548962
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
RECOVER_PARSER is gone because of bugs in lxml in windows, https://bugs.launchpad.net/lxml/+bug/2125756. I dont know why any plugins would have been using it, the correct way to parse html is to use the parse_html function from calibre.oeb.parse_utils. But if plugins want to parse html or xml using lxml directly, the relevant functions are safe_xml_fromstring and safe_html_fromstring from the calibre.utils.xml_parse module. And if they really, really want to use RECOVER_PARSER then can simply define it themselves as

Code:
from lxml import etree
RECOVER_PARSER = etree.XMLParser(recover=True, no_network=True, resolve_entities=False)
Note that I strongly recommend against using RECOVER_PARSER as it is fundamentally broken thanks to the bug in lxml linked to above.

Last edited by kovidgoyal; 10-01-2025 at 08:27 PM.
kovidgoyal is offline   Reply With Quote
Old Yesterday, 12:10 AM   #3
Voicedude
Junior Member
Voicedude began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jan 2024
Device: Kindle Fire
I am using Calibre Portable and the Quality Check plug-in stopped functioning after the update to 8.12. It shows as existing in the plug-ins list. If I try to configure it I get an error message saying "you must restart Calibre to configure Quality Check" but after restarting I get the same message. I uninstalled and reinstalled the plug in but nothing changes. Not available in toolbar or context menu configuration either. Any suggestions appreciated.
Voicedude is offline   Reply With Quote
Old Yesterday, 12:49 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,558
Karma: 28548962
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You need to wait till the plugins are updated, which hopefully will be soon given that the fix is trivial. Or if you are desperate to use the plugins, downgrade calibre to 8.11.1
kovidgoyal is offline   Reply With Quote
Old Yesterday, 01:33 AM   #5
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,677
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I've found some plugins which use it:
  • QualityCheck
  • KoboUtilities (I don't know if it has changed)
  • GoodReads_Sync
  • Modifyepub

So, I think I'll have to wait for a bit to update calibre. Glad to have found this thread.
Terisa de morgan is offline   Reply With Quote
Old Yesterday, 05:29 AM   #6
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: 80,415
Karma: 150249609
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 Terisa de morgan View Post
I've found some plugins which use it:
  • QualityCheck
  • KoboUtilities (I don't know if it has changed)
  • GoodReads_Sync
  • Modifyepub

So, I think I'll have to wait for a bit to update calibre. Glad to have found this thread.
The current Kobo Utilities does not use RECOVER_PARSER.

I've modified GoodReads Sync, Hyphenate This!, Modify ePub, and Quality Check to work with calibre 8.12. I've posted them in the plugin's thread. I've upped the versions by .1.

Last edited by JSWolf; Yesterday at 06:10 AM.
JSWolf is offline   Reply With Quote
Old Yesterday, 05:32 AM   #7
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: 80,415
Karma: 150249609
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 kovidgoyal View Post
RECOVER_PARSER is gone because of bugs in lxml in windows, https://bugs.launchpad.net/lxml/+bug/2125756. I dont know why any plugins would have been using it, the correct way to parse html is to use the parse_html function from calibre.oeb.parse_utils. But if plugins want to parse html or xml using lxml directly, the relevant functions are safe_xml_fromstring and safe_html_fromstring from the calibre.utils.xml_parse module. And if they really, really want to use RECOVER_PARSER then can simply define it themselves as

Code:
from lxml import etree
RECOVER_PARSER = etree.XMLParser(recover=True, no_network=True, resolve_entities=False)
Note that I strongly recommend against using RECOVER_PARSER as it is fundamentally broken thanks to the bug in lxml linked to above.
Thank you very much. The fix is very easy as you've said. I've been updating some of the plugins that use RECOVER_PARSER and posting them for others.
JSWolf is offline   Reply With Quote
Old Yesterday, 06:06 AM   #8
rantanplan
Weirdo
rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.
 
Posts: 886
Karma: 11659320
Join Date: Nov 2019
Location: Wuppertal, Germany
Device: Kobo Sage, Kobo Libra 2, Boox Note Air 2+
Quote:
Originally Posted by JSWolf View Post
The current Kobo Utilities does not use RECOVER_PARSER.

I've modified GoodReads Sync, Hyphenate This!, Modify ePub, and Quality Check to all work with calibre 8.12. I've posted them in the plugin's thread. I've upped the versions by .1.
Thank you for your tribute, it is well received.
rantanplan is offline   Reply With Quote
Old Yesterday, 06:09 AM   #9
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: 80,415
Karma: 150249609
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 rantanplan View Post
Thank you for your tribute, it is well received.
You are very welcome.
JSWolf is offline   Reply With Quote
Old Yesterday, 08:56 AM   #10
zardoxnet
Junior Member
zardoxnet began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Dec 2016
Device: android phone
also error new to version 8.12

when i use Modify ePubs I get error and a jacket is not created. This did not happen with previous version

Modify ePubs version (1, 8, 6)
Traceback (most recent call last):
File "runpy.py", line 198, in _run_module_as_main
File "runpy.py", line 88, in _run_code
File "site.py", line 42, in <module>
File "site.py", line 38, in main
File "calibre/utils/ipc/worker.py", line 213, in main
File "calibre/utils/ipc/worker.py", line 147, in arbitrary_n
File "importlib/__init__.py", line 126, in import_module
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "calibre/customize/zipplugin.py", line 210, in exec_module
File "calibre_plugins.modify_epub.jobs", line 10, in <module>
File "calibre/customize/zipplugin.py", line 210, in exec_module
File "calibre_plugins.modify_epub.modify", line 19, in <module>
File "calibre/customize/zipplugin.py", line 210, in exec_module
File "calibre_plugins.modify_epub.container", line 25, in <module>
ImportError: cannot import name 'RECOVER_PARSER' from 'calibre.ebooks.oeb.parse_utils' (/Applications/calibre.app/Contents/Frameworks/plugins/python-lib.bypy.frozen/calibre/ebooks/oeb/parse_utils.pyc)
zardoxnet is offline   Reply With Quote
Old Yesterday, 11:24 AM   #11
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: 80,415
Karma: 150249609
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 zardoxnet View Post
when i use Modify ePubs I get error and a jacket is not created. This did not happen with previous version
Go to https://www.mobileread.com/forums/sh...d.php?t=154371 and at the end of the thread, I posted a modified version of Modify ePub that fixes the problem.
JSWolf is offline   Reply With Quote
Old Yesterday, 11:25 AM   #12
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: 80,415
Karma: 150249609
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Given that nobody has posted a problem with the modified plugins, would an admin please make these the latest versions? That way those not on MR can get the fixed versions. Thanks.
JSWolf is offline   Reply With Quote
Old Yesterday, 01:14 PM   #13
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,636
Karma: 79983758
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Quote:
Originally Posted by JSWolf View Post
Given that nobody has posted a problem with the modified plugins, would an admin please make these the latest versions? That way those not on MR can get the fixed versions. Thanks.
Please note that plugins normally have 3 part numbers; ie 3.4.1 and not 3.4.1.1

I'm not sure that calibre's version check for updates will handle your numbers.

Sent from my TB350FU using Tapatalk
PeterT is offline   Reply With Quote
Old Yesterday, 01:51 PM   #14
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,636
Karma: 79983758
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Additionally, kiwidude maintains his plugins through GitHub. See https://github.com/kiwidude68/calibre_plugins so for at least GoodReads Sync, Modify ePub and Quality Check I'd suggest having the courtesy of doing things the correct way and submitting an update to him.
PeterT is offline   Reply With Quote
Old Yesterday, 03:53 PM   #15
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,677
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by kovidgoyal View Post
RECOVER_PARSER is gone because of bugs in lxml in windows, https://bugs.launchpad.net/lxml/+bug/2125756. I dont know why any plugins would have been using it, the correct way to parse html is to use the parse_html function from calibre.oeb.parse_utils. But if plugins want to parse html or xml using lxml directly, the relevant functions are safe_xml_fromstring and safe_html_fromstring from the calibre.utils.xml_parse module. And if they really, really want to use RECOVER_PARSER then can simply define it themselves as

Code:
from lxml import etree
RECOVER_PARSER = etree.XMLParser(recover=True, no_network=True, resolve_entities=False)
Note that I strongly recommend against using RECOVER_PARSER as it is fundamentally broken thanks to the bug in lxml linked to above.
Checking some plugin, RECOVER_PARSER is not used for parsing html (it uses parse_html in that case) but for parsing xml. Is there any calibre function for that?
Terisa de morgan is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Latest kindle for PC update breaks Calibre import AndyT1 Amazon Kindle 3 02-06-2017 09:12 AM
Using calibre.ebooks.oeb.polish.container in a driver davidfor Development 10 07-26-2013 03:02 AM
Calibre to Android device - remove sending to eBooks/import folder? bosun120 Calibre 1 09-23-2011 04:12 AM
Import ebooks to Calibre from Kindle krikket Devices 2 03-02-2011 04:41 PM
Calibre on Mac can't import eBooks robfb Calibre 5 12-16-2009 03:09 PM


All times are GMT -4. The time now is 03:40 PM.


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