View Single Post
Old 04-19-2021, 12:39 PM   #544
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,461
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by SoccerDad91016 View Post
Latest update appears to have broken TemplateBox.

I have the following line in an action chain module:

from calibre_plugins.action_chains.templates import TemplateBox, check_template, get_metadata_object

Getting the following error after the latest plugin and Cailbre updates:
calibre, version 5.16.0
ERROR: Invalid Python code: The code you created is not valid Python code, with error: cannot import name 'TemplateBox' from 'calibre_plugins.action_chains.templates' (C:\Users\xxxxxxx\AppData\Roaming\calibre\plugins\ Action Chains.zip/templates/__init__.py)

Is this something I can fix, or do I need to wait for an update to ActionsChains plugin or Calibre?
Try
Code:
from calibre_plugins.action_chains.templates.dialogs import TemplateBox
from calibre_plugins.action_chains.templates import check_template, get_metadata_object
chaley is offline   Reply With Quote