diff --git a/anki/template/template.py b/anki/template/template.py index da5b13e98..b3efc6042 100644 --- a/anki/template/template.py +++ b/anki/template/template.py @@ -131,7 +131,7 @@ class Template(object): func = modifiers[tag_type] replacement = func(self, tag_name, context) template = template.replace(tag, replacement) - except SyntaxError: + except (SyntaxError, KeyError): return u"{{invalid template}}" return template