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 09-27-2020, 10:08 AM   #1456
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,771
Karma: 145864619
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 Leonatus View Post
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'
This occurs with every book I try to handle. Any idea?
Go to post 1416 and download the scrambled ePub I posted. 1.5.5 does work for me with with 5.0.1 portable which is a 32-bit version. I am using Windows 10 64-bit. It should work for you. I've tested with my settings, with all checked, and just each section checked and it worked.

If it still doesn't work, download the portable 5.0.1 and try that in case it could be something in your settings. Did you have any old PY2 plugins installed when you upgraded to 5.x?
JSWolf is offline   Reply With Quote
Old 09-27-2020, 05:19 PM   #1457
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Leonatus View Post
I installed it, but now this error occurs:
This looks like another example of a binary file inside the epub, such as an image, that the plugin isn't prepared for. I won't be able to debug it without the book. Please send a copy to calibre-bugs-mod [at] charleshaley [dot] org (make the replacements). I promise I won't keep it or otherwise violate copyright.
chaley is offline   Reply With Quote
Old 09-28-2020, 04:40 AM   #1458
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Yet another attempt ...

I found and fixed a place where unneeded binary files were being read, causing the plugin to fail. After fixing this the plugin runs on both calibre 4 and calibre 5 (for me), tested using several of my books & JSWolf's test book. All boxes were checked.

We might be able to avoid a fork.

Last edited by chaley; 09-28-2020 at 05:22 PM. Reason: Remove obsolete install file
chaley is offline   Reply With Quote
Old 09-28-2020, 04:59 AM   #1459
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 1,055
Karma: 11391181
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
Thank you, chaley, it works on my Windows 10, 64bit. I'll try it on the 32bit as well.
I suppose your request from #1457 is obsolete?
Leonatus is offline   Reply With Quote
Old 09-28-2020, 05:04 AM   #1460
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Leonatus View Post
Thank you, chaley, it works on my Windows 10, 64bit. I'll try it on the 32bit as well.
I suppose your request from #1457 is obsolete?
Yes. Now that it works for you I don't need the book.
chaley is offline   Reply With Quote
Old 09-28-2020, 05:13 AM   #1461
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 1,055
Karma: 11391181
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
Works on my 32bit as well! Great!
Leonatus is offline   Reply With Quote
Old 09-28-2020, 05:57 AM   #1462
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,771
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I've been testing the new beta (1.5.6) and it's working with Calibre 5. I'll test with 4.23 soon.

Last edited by JSWolf; 09-28-2020 at 06:13 AM.
JSWolf is offline   Reply With Quote
Old 09-28-2020, 06:14 AM   #1463
anacreon
Guru
anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.
 
anacreon's Avatar
 
Posts: 976
Karma: 3475832
Join Date: May 2012
Location: France
Device: Elipsa, Sage, Libra 2
It works for me, calibre 5, windows 10 version 2004, 64 bits.
anacreon is offline   Reply With Quote
Old 09-28-2020, 10:24 AM   #1464
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: 46,280
Karma: 169098402
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
@chaley: Ran it against 8 books with every option checked and then one option at a time and no issues when running epubcheck against the modified epubs. Looks good. I also ran it against a total crap epub and it didn't do any damage to it (one of my wife's books that was saved to epub from a word processor -- it makes a great test for epubcheck. )

Again, thanks very much for your time and effort!
DNSB is offline   Reply With Quote
Old 09-28-2020, 10:39 AM   #1465
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,771
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Looks like we are good to go.

Thank you very much chaley!
JSWolf is offline   Reply With Quote
Old 09-28-2020, 10:56 AM   #1466
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by JSWolf View Post
Looks like we are good to go.

Thank you very much chaley!
Did you get time to test it on 4.23? If so then unless there are objections I will release 1.5.6 without doing the fork.
chaley is offline   Reply With Quote
Old 09-28-2020, 02:07 PM   #1467
fvdham
Connoisseur
fvdham began at the beginning.
 
fvdham's Avatar
 
Posts: 52
Karma: 10
Join Date: Jun 2012
Location: Zaandam, The Netherlands
Device: sony PRS-T1 / Kobo Glo HD
I have tested a few books with version 1.5.6 (calibre 5.01) . As far as I can see the plugin works ok.
One small observation: the help file gives an error message on line 159:

File "calibre_plugins.modify_epub.dialogs", line 159, in _help_link_activated
File "calibre_plugins.modify_epub.action", line 138, in show_help
File "calibre_plugins.modify_epub.action", line 136, in get_help_file_resource
TypeError: write() argument must be str, not bytes

Thanks for the conversion of the plugin. I use it a lot
fvdham is offline   Reply With Quote
Old 09-28-2020, 02:12 PM   #1468
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: 46,280
Karma: 169098402
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by fvdham View Post
I have tested a few books with version 1.5.6 (calibre 5.01) . As far as I can see the plugin works ok.
One small observation: the help file gives an error message on line 159:

File "calibre_plugins.modify_epub.dialogs", line 159, in _help_link_activated
File "calibre_plugins.modify_epub.action", line 138, in show_help
File "calibre_plugins.modify_epub.action", line 136, in get_help_file_resource
TypeError: write() argument must be str, not bytes

Thanks for the conversion of the plugin. I use it a lot
I spent some time testing all the functions and I never bothered to look at the help. Good to see someone is more thorough than I am.

Spoiler:
Code:
calibre, version 5.0.1
ERROR: Unhandled exception: <b>TypeError</b>:write() argument must be str, not bytes

calibre 5.0.1 [64bit]  embedded-python: True is64bit: True
Windows-10-10.0.19041-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', 'SP0', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeDRM (7, 0, 0) && Annotations (1, 12, 0) && Baen (1, 2, 0) && Calibre Power Search Plugin (1, 6, 0) && Count Pages (1, 10, 0) && Diaps Editing Toolbag (0, 3, 6) && EpubCheck (0, 2, 3) && EpubMerge (2, 11, 0) && EpubSplit (2, 9, 0) && FanFicFare (3, 23, 0) && Fantastic Fiction (1, 4, 0) && Find Duplicates (1, 7, 5) && Goodreads (1, 5, 1) && Hyphenate This! (0, 1, 0) && Job Spy (1, 0, 184) && KePub Input (3, 2, 10) && KePub Metadata Reader (3, 2, 9) && KePub Metadata Writer (3, 2, 12) && KePub Output (3, 2, 15) && Kindle hi-res covers (0, 4, 1) && KindleUnpack - The Plugin (0, 82, 3) && Kobo Books (1, 8, 0) && Kobo Utilities (2, 11, 5) && KoboTouchExtended (3, 2, 15) && Modify ePub (1, 5, 6) && Obok DeDRM (6, 7, 0) && Open With (1, 5, 12) && Quality Check (1, 10, 1) && Resize Cover (1, 1, 0) && ScrambleEbook (0, 4, 5) && SmartEject (2, 3, 0) && Smashwords Metadata (1, 0, 2)
Traceback (most recent call last):
  File "calibre_plugins.modify_epub.dialogs", line 159, in _help_link_activated
  File "calibre_plugins.modify_epub.action", line 138, in show_help
  File "calibre_plugins.modify_epub.action", line 136, in get_help_file_resource
TypeError: write() argument must be str, not bytes
DNSB is offline   Reply With Quote
Old 09-28-2020, 05:21 PM   #1469
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Thank you @fvdham and @DNSB.

Version 1.5.7, fixing the problem accessing the help file. Tested on 4.23 and 5.0.1.

If
  • this change works for people other than me
  • people tell me that the plugin works on calibre versions before 5
  • no other problems are reported in the next day or so
then I will release this version.

Last edited by chaley; 09-29-2020 at 06:11 AM. Reason: Remove obsolete plugin zip
chaley is offline   Reply With Quote
Old 09-28-2020, 06:19 PM   #1470
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,771
Karma: 145864619
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 chaley View Post
Thank you @fvdham and @DNSB.

Version 1.5.7, fixing the problem accessing the help file. Tested on 4.23 and 5.0.1.

If
  • this change works for people other than me
  • people tell me that the plugin works on calibre versions before 5
  • no other problems are reported in the next day or so
then I will release this version.
With 5.0.1 and all options checked it's working.

With 4.23 (all options checked)and the ePub I sent to you that's not scrambled.
Code:
calibre, version 4.23.0
ERROR: Modify ePub failed: No ePub files were updated

Modify ePubs
Logfile for book ID 2252 (The Measure of the Magic / Terry Brooks)
2252
  Modifying:  C:\Users\help\AppData\Local\Temp\calibre_eomo94\7ggd8n_modify_epub\2252.epub
	Updating metadata and cover
Parsing xml file: Broo_9780345529213_epub_opf_r1.opf
Parsing xml file: Broo_9780345529213_epub_ncx_r1.ncx
	Looking for redundant entries in manifest
	Looking for unmanifested files
	  Found file to to add: META-INF/com.apple.ibooks.display-options.xml
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 129, in _process_book
  File "calibre_plugins.modify_epub.modify", line 282, in _process_unmanifested_files
  File "calibre_plugins.modify_epub.container", line 404, in add_name_to_manifest
  File "calibre_plugins.modify_epub.container", line 417, in generate_manifest_id
OverflowError: Python int too large to convert to C long

ePub not changed after 1.39 seconds

Last edited by JSWolf; 09-28-2020 at 06:24 PM.
JSWolf is offline   Reply With Quote
Reply

Tags
modify epub


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 07:41 PM.


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