![]() |
#1441 |
Member
![]() Posts: 11
Karma: 10
Join Date: Nov 2011
Device: generic android 4.0
|
Thank you, this version worked for me in Calibre 5.0.1
Last edited by susanpr; 09-26-2020 at 09:14 PM. |
![]() |
![]() |
![]() |
#1442 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Code:
calibre, version 4.23.0 ERROR: Modify ePub failed: No ePub files were updated Modify ePubs Logfile for book ID 2244 (The Measure of the Magic / Terry Brooks) 2244 Modifying: C:\Users\help\AppData\Local\Temp\calibre_vywtfv\kerujr_modify_epub\2244.epub Parsing xml file: Broo_9780345529213_epub_opf_r1.opf Parsing xml file: Broo_9780345529213_epub_ncx_r1.ncx Looking for broken links in the NCX Looking for Adobe xpgt files and links to remove Found xpgt file to to remove: OEBPS/page-template.xpgt Manifest item removed: OEBPS/page-template.xpgt (page) The Measure of the Magic - ERROR: Traceback (most recent call last): File "calibre_plugins.modify_epub.modify", line 79, in process_book File "calibre_plugins.modify_epub.modify", line 141, in _process_book File "calibre_plugins.modify_epub.modify", line 365, in _remove_xpgt_files File "calibre_plugins.modify_epub.container", line 232, in get_parsed_etree File "calibre_plugins.modify_epub.container", line 222, in get_raw File "encodings\cp1252.py", line 23, in decode UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 1317: character maps to <undefined> ePub not changed after 0.71 seconds |
|
![]() |
![]() |
Advert | |
|
![]() |
#1443 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
|
Y’know, if it comes to it, it might not be the worst idea in the world to treat the Python v3 port as a fork for the time being. That way, the still-current iteration would remain in place for 4.x users and the port could be restricted to 5.x. It’d probably require renaming the ported plugin and a couple of files (like the me.py CLI interface script) to avoid collisions, but it would mean not having to worry about Python v2 compatibility.
Like I said, just an idea, but if it helps… Then, perhaps, if circumstances merit it and the working v3 port can be made v2-compatible, either they could be merged or the v2 edition could formally be updated to the v3 port. Basically, I’m considering options that (a) don’t break the plugin for anyone and (b) make a working version available on calibre 5 sooner. But remember that I’m speaking as a spectator on this process. Last edited by Rev. Bob; 09-26-2020 at 09:48 PM. |
![]() |
![]() |
![]() |
#1444 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,191
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Unfortunately, using calibre 4.23 portable, it's not a happy camper. Personally, I think @RevBob has the right idea to fork the plugin with a Python2 version for calibre 4 and older and a Python3 for calibre 5 and newer rather than attempting to support both in one plugin at this time. |
|
![]() |
![]() |
![]() |
#1445 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
![]() As for me.py, I don't think renaming is needed. There can (should) be only one version of the PI installed so there can't be name collisions. I think it sufficient to rename the PI in __init__. This will (I think) require new lines in the PI index and a new PI thread so the calibre plugin updater doesn't get confused. Keeping the current plugin-import-name-modify_epub.txt should permit keeping all the internal import statements. The only way to be sure is to try it. How about "Modify Epub 5" for calibre 5 and up? Or "Modify Epub 2" for version 2? Quote:
Another thing I am thinking about is modifying the plugin updater to support multiple zip files for a plugin. It would choose one that a) works in the running version of calibre and b) has the highest PI version number. This allows overlap between supported calibre versions. In any event, I will look at all this tomorrow. Today is grandchildren day. ![]() |
||
![]() |
![]() |
Advert | |
|
![]() |
#1446 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,349
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There is no need to fork, simply set the minimum_calibre_version in _init__.py to 5, 0, 0 then users on calibre 4 wont be allowed to upgrade (at least that's how my memory of the plugin update system says it works).
The only down side is anyone on calibre 4 that does not already have the plugin, will not be able to install it. If you wish to cater to such people, I suggest a fork with this plugin remaining the main one and support calibre 5+ while the fork can be for calibre < 5 people. |
![]() |
![]() |
![]() |
#1447 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Good point. Keep the existing name for existing users.
|
![]() |
![]() |
![]() |
#1448 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
|
Quote:
Quote:
Quote:
Yeah, I could get down with that idea. I hate breaking backward compatibility on general principles, but leaving an active fallback version would alleviate that. And then, down the line, if somebody were to look at the pair and say, “hey, I can fuse these into a universal edition,” so much the better. Meanwhile, if forking makes it easier to get a good fix faster, that’s a win for the community at large. Again, just a spectator in this process, but this sounds like a plan. Last edited by Rev. Bob; 09-27-2020 at 04:34 AM. |
|||
![]() |
![]() |
![]() |
#1449 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
You could stash the existing version of the PI into this thread for anyone who can't move to 5 for whatever reason. And a put a link to it in this PI's first post.
@chaley - if you're thinking of changes to the Updater, perhaps we can consider getting rid the redundant data in the MR Index, the data that's also in __init__py. Its hopelessly out of date and serves no useful purpose. BR |
![]() |
![]() |
![]() |
#1450 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,055
Karma: 11391181
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
Calibre v. 5.0.1, Windows 10 32 bit.
At running "Modify ebub", I recently receive this message: Code:
Modify ePubs
Traceback (most recent call last):
File "runpy.py", line 194, in _run_module_as_main
File "runpy.py", line 87, in _run_code
File "site.py", line 89, in <module>
File "site.py", line 84, in main
File "site.py", line 55, in run_entry_point
File "site-packages\calibre\utils\ipc\worker.py", line 215, in main
File "site-packages\calibre\utils\ipc\worker.py", line 143, in arbitrary_n
File "importlib\__init__.py", line 127, in import_module
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
File "site-packages\calibre\customize\zipplugin.py", line 184, in load_module
File "calibre_plugins.modify_epub.jobs", line 14, in <module>
File "site-packages\calibre\customize\zipplugin.py", line 184, in load_module
File "calibre_plugins.modify_epub.modify", line 22, in <module>
File "site-packages\calibre\customize\zipplugin.py", line 184, in load_module
File "calibre_plugins.modify_epub.container", line 14, in <module>
ModuleNotFoundError: No module named 'urlparse'
|
![]() |
![]() |
![]() |
#1451 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
According to this thread, this plugin is incompatible with Calibre 5. Try Chaley's version.
|
![]() |
![]() |
![]() |
#1452 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,055
Karma: 11391181
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
I installed it, but now this error occurs:
Code:
calibre, version 5.0.1 FEHLER: Modify ePub failed: No ePub files were updated Modify ePubs Logfile for book ID 724 (Der Hochwald / Adalbert Stifter) 724 Modifying: C:\CalibreData\Temporary\calibre_pwwbj6fc\t3bjk95m_modify_epub\724.epub Updating metadata and cover Parsing xml file: OEBPS/content.opf Parsing xml file: OEBPS/toc.ncx Looking for redundant entries in manifest Looking for unmanifested files Looking for broken links in the NCX Looking for html pages containing only broken image links Looking for non dc: elements in manifest Removing child: <Element {http://www.idpf.org/2007/opf}meta at 0x5b7d588> Removing child: <Element {http://www.idpf.org/2007/opf}meta at 0x5b7d7e8> Removing child: <Element {http://www.idpf.org/2007/opf}meta at 0x5b7d788> Removing child: <Element {http://www.idpf.org/2007/opf}meta at 0x5b7d848> Removing child: <Element {http://www.idpf.org/2007/opf}meta at 0x5b7d828> Removing child: <Element {http://www.idpf.org/2007/opf}meta at 0x5b7d868> Removing child: <Element {http://www.idpf.org/2007/opf}meta at 0x5b7d8c8> Removing child: <Element {http://www.idpf.org/2007/opf}meta at 0x5b7d888> Looking for CSS margins Der Hochwald - ERROR: Traceback (most recent call last): File "calibre_plugins.modify_epub.modify", line 79, in process_book File "calibre_plugins.modify_epub.modify", line 175, in _process_book File "calibre_plugins.modify_epub.modify", line 423, in _rewrite_css_margins File "calibre_plugins.modify_epub.margins", line 170, in rewrite_css_margins File "calibre_plugins.modify_epub.container", line 222, in get_raw File "codecs.py", line 322, in decode UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 7: invalid start byte ePub not changed after 0.95 seconds |
![]() |
![]() |
![]() |
#1453 |
Chalut o/
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 439
Karma: 145424
Join Date: Dec 2017
Device: Kobo
|
I am also for the "minimum_caliber_version to 5" solution.
And it's still possible to leave the zip link of the 1.4 version with a big warning "legacy for Calibre 4 and below". |
![]() |
![]() |
![]() |
#1454 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Please post which version of the plugin when you post an error report.
|
![]() |
![]() |
![]() |
#1455 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,055
Karma: 11391181
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
Sorry, I forgot: 1.5.5.
|
![]() |
![]() |
![]() |
Tags |
modify epub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Quality Check | kiwidude | Plugins | 1251 | 07-07-2025 09:13 PM |
[GUI Plugin] Open With | kiwidude | Plugins | 404 | 02-21-2025 05:42 AM |
[GUI Plugin] Manage Series | kiwidude | Plugins | 167 | 07-28-2024 03:07 PM |
Modify ePub plugin dev thread | kiwidude | Development | 346 | 09-02-2013 05:14 PM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |