Quote:
Originally Posted by shauntih
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.