View Single Post
Old 12-31-2021, 11:41 PM   #777
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: 11,063
Karma: 75568269
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
New glitch noticed after updating to newest version:

On my 'view' chain, view_manager_last_view() != 'Physical Books' in conditions results in an action consistently failing. Removing it made it work again. I got this error in the evaluator:

Code:
EXCEPTION:  Interpreter: Internal error evaluating an expression: 'eval_() missing 1 required positional argument: 'locals'' - line number 2
Here's the function:

Code:
from calibre_plugins.action_chains.templates import TemplateFunction

class ViewManagerLastVIew(TemplateFunction):

    name = 'view_manager_last_view'
    arg_count = 0

    def evaluate(self, formatter, kwargs, mi, locals):
        import calibre_plugins.view_manager.config as cfg
        gui = self.plugin_action.gui
        library_config = cfg.get_library_config(gui.current_db)
        return library_config.get(cfg.KEY_LAST_VIEW, '')

Thankfully, current_virtual_library_name() works just as well (maybe better) for my purposes - but was something used in it deprecated or changed?

Last edited by ownedbycats; 12-31-2021 at 11:44 PM.
ownedbycats is offline   Reply With Quote