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-25-2020, 06:18 AM   #1396
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
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
So, calibre 5.0.0 is now out, and with it comes the move to Python v3.

Which I do not know. (Okay, technically I don't really know Python v2, either, but tinkering within a code base is a lot easier than trying to upgrade to a new one.)

So this leaves us in a pickle: incompatible and outdated.

Does anyone both know Python v3 and have the time and inclination to tackle this upgrade?
Rev. Bob is offline   Reply With Quote
Old 09-25-2020, 06:39 AM   #1397
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 Rev. Bob View Post
Does anyone both know Python v3 and have the time and inclination to tackle this upgrade?
I will port it this weekend unless someone gets to it first. I don't use it so can't test it beyond obvious things.
chaley is offline   Reply With Quote
Advert
Old 09-25-2020, 01:45 PM   #1398
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
Python 3-compatible version for testing. As I said, I don't use the plugin so I don't know how to test it. This version starts on calibre 5 and can embed metadata. I didn't try it on calibre 4

Last edited by chaley; 09-28-2020 at 11:01 AM. Reason: Remove broken beta release
chaley is offline   Reply With Quote
Old 09-25-2020, 02:16 PM   #1399
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
"Update Metadata" seems to work as expected. The feature I use most returned this error, though.

Remove calibre bookmark files:

Code:
  Modifying:  C:\Users\[username]\AppData\Local\Temp\calibre_7mgpz7uw\u9snmsek_modify_epub\5035.epub

Parsing xml file: content.opf

Parsing xml file: toc.ncx

	Looking for files to remove: ['META-INF/calibre_bookmarks.txt']

	  Found file to remove: META-INF/calibre_bookmarks.txt

No Cats Allowed - ERROR: Traceback (most recent call last):

  File "calibre_plugins.modify_epub.modify", line 80, in process_book

  File "calibre_plugins.modify_epub.container", line 687, in write

TypeError: string argument without an encoding



ePub not changed after 0.44 seconds
ownedbycats is offline   Reply With Quote
Old 09-25-2020, 02:36 PM   #1400
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 ownedbycats View Post
"Update Metadata" seems to work as expected. The feature I use most returned this error, though.

Remove calibre bookmark files:
This version fixes that problem, and probably several others.

Last edited by chaley; 09-28-2020 at 11:01 AM. Reason: Remove broken beta release
chaley is offline   Reply With Quote
Advert
Old 09-25-2020, 04:34 PM   #1401
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,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:
Originally Posted by chaley View Post
This version fixes that problem, and probably several others.
So far it's working with Calibre 4.23. I'm just waiting for Hyphenate This! to be converted before I switch to Calibre 5.
JSWolf is offline   Reply With Quote
Old 09-25-2020, 05:16 PM   #1402
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Thanks for the fix.
ownedbycats is offline   Reply With Quote
Old 09-25-2020, 05:58 PM   #1403
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,210
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Using calibre 5.0.1, Modify Epub errors on quite a few functions. Most of the error messages were along the lines of:

Smarten Punctuation: TypeError: a bytes-like object is required, not 'str'

Strip Spans: TypeError: cannot use a string pattern on a bytes-like object
DNSB is offline   Reply With Quote
Old 09-25-2020, 06:01 PM   #1404
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 DNSB View Post
Using calibre 5.0.1, Modify Epub errors on the quite a few functions. Most of the error messages were along the lines of:

Smarten Punctuation: TypeError: a bytes-like object is required, not 'str'

Strip Spans: TypeError: cannot use a string pattern on a bytes-like object
Sorry, but this isn't helpful. I need the entire error message, otherwise I have no idea where to look.

Honestly, I am considering abandoning the port project.
chaley is offline   Reply With Quote
Old 09-25-2020, 06:08 PM   #1405
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,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:
Originally Posted by chaley View Post
Sorry, but this isn't helpful. I need the entire error message, otherwise I have no idea where to look.

Honestly, I am considering abandoning the port project.
I do use this plugin very much. If it's not converted, I'll have to stay with 4.23. So please don't abandon porting.
JSWolf is offline   Reply With Quote
Old 09-25-2020, 06:13 PM   #1406
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Here's the error I got running strip spans + smarten puncuation. If you need them run separately I can do that.

Code:
  Modifying:  C:\Users\[user]\AppData\Local\Temp\calibre_n7_o6tj0\k9ixvfiz_modify_epub\5036.epub

Parsing xml file: content.opf

Parsing xml file: toc.ncx

	Applying smarten punctuation

No Cats Allowed - ERROR: Traceback (most recent call last):

  File "calibre_plugins.modify_epub.modify", line 78, in process_book

  File "calibre_plugins.modify_epub.modify", line 180, in _process_book

  File "calibre_plugins.modify_epub.modify", line 518, in _smarten_punctuation

  File "calibre_plugins.modify_epub.modify", line 504, in smarten_punctuation_for_page

TypeError: a bytes-like object is required, not 'str'



ePub not changed after 0.43 seconds
ownedbycats is offline   Reply With Quote
Old 09-25-2020, 06:18 PM   #1407
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,210
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by chaley View Post
Sorry, but this isn't helpful. I need the entire error message, otherwise I have no idea where to look.

Honestly, I am considering abandoning the port project.
Here's the error message for the two items I mentioned.

Spoiler:

Code:
calibre, version 5.0.1
ERROR: Modify ePub failed: No ePub files were updated

Modify ePubs


  Modifying:  C:\Users\David\AppData\Local\Temp\calibre_eafsouve\v6xq5hp6_modify_epub\9904.epub

Parsing xml file: OEBPS/content.opf

Parsing xml file: OEBPS/toc.ncx

	Stripping spans

Mind Games - ERROR: Traceback (most recent call last):

  File "calibre_plugins.modify_epub.modify", line 78, in process_book

  File "calibre_plugins.modify_epub.modify", line 194, in _process_book

  File "calibre_plugins.modify_epub.modify", line 699, in _strip_spans

  File "calibre_plugins.modify_epub.modify", line 641, in strip_span_for_page

  File "re.py", line 210, in sub

TypeError: cannot use a string pattern on a bytes-like object



ePub not changed after 0.26 seconds



Spoiler:
Code:
calibre, version 5.0.1
ERROR: Modify ePub failed: No ePub files were updated

Modify ePubs


  Modifying:  C:\Users\David\AppData\Local\Temp\calibre_eafsouve\3h6316_n_modify_epub\9904.epub

Parsing xml file: OEBPS/content.opf

Parsing xml file: OEBPS/toc.ncx

	Applying smarten punctuation

Mind Games - ERROR: Traceback (most recent call last):

  File "calibre_plugins.modify_epub.modify", line 78, in process_book

  File "calibre_plugins.modify_epub.modify", line 180, in _process_book

  File "calibre_plugins.modify_epub.modify", line 518, in _smarten_punctuation

  File "calibre_plugins.modify_epub.modify", line 504, in smarten_punctuation_for_page

TypeError: a bytes-like object is required, not 'str'



ePub not changed after 0.26 seconds
DNSB is offline   Reply With Quote
Old 09-26-2020, 06:49 AM   #1408
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 test version. I tested it by choosing many of the options. It completed without crashing. I suspect the output is even correct.

I don't know if this version is compatible with python 2 (calibre 4). There are a zillion fiddly bits around character conversion that it might not be.

Last edited by chaley; 09-28-2020 at 11:02 AM. Reason: Remove broken beta release
chaley is offline   Reply With Quote
Old 09-26-2020, 07:05 AM   #1409
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,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:
Originally Posted by chaley View Post
Yet another test version. I tested it by choosing many of the options. It completed without crashing. I suspect the output is even correct.

I don't know if this version is compatible with python 2 (calibre 4). There are a zillion fiddly bits around character conversion that it might not be.
I'll test with 4.23 today.
JSWolf is offline   Reply With Quote
Old 09-26-2020, 07:36 AM   #1410
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
I'll test with 4.23 today.
Thank you.

Attached is a version that eliminates one possibility of incompatibility.

Last edited by chaley; 09-28-2020 at 11:02 AM. Reason: Remove broken beta release
chaley 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 02:35 AM.


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