View Single Post
Old 07-16-2022, 07:32 PM   #367
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,334
Karma: 5007213
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by shauntih View Post
File "calibre_plugins.epubsplit.dialogs", line 299, in contextMenuEvent
TypeError: exec_() takes 1 positional argument but 2 were given
The right-click a section to "check selected" feature appears to be the only part that has a problem. So you can still use EpubSplit, just not that particular feature.

What's happening:

Qt6 renamed a function previously exec_() to exec().

Python2 reserved exec as a fundamental statement of the language, like if() or while(). Which means if I try to use q.exec() in Cal3/4, it throws a syntax error, rather than anything I can catch and make conditional. (Which is why qt called it exec_ instead.)

kovid thoughtfully restored exec_() in Calibre's qt6 compatibility code, but without parameters.

I've submitted a PR to add them. If accepted, this EpubSplit feature will work again in the next calibre release with no other action.

If the PR (or some equivalent) is not accepted, I will have consider dropping Cal3/4 support for EpubSplit, or re-architecting how the right-click menu feature works.
JimmXinu is offline   Reply With Quote