From 13abf38ffbc2d18de5d4e44b4685b56cfd46e281 Mon Sep 17 00:00:00 2001 From: Alvaro Calace Date: Fri, 16 Mar 2018 09:51:48 -0300 Subject: [PATCH] Catch exception when checking if a note can be created --- AnkiConnect.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/AnkiConnect.py b/AnkiConnect.py index 7dca7c1..f0ac191 100644 --- a/AnkiConnect.py +++ b/AnkiConnect.py @@ -401,7 +401,10 @@ class AnkiBridge: def canAddNote(self, note): - return bool(self.createNote(note)) + try: + return bool(self.createNote(note)) + except: + return False def createNote(self, params):