From 331239de05cdb5c734a694f312b7534fd005e0c6 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 6 Aug 2017 13:46:18 +1000 Subject: [PATCH] fix TypeError: channel.execCallbacks[message.id] is not a function we need to avoid calling setHtml() until the bridge command has had a chance to pass its return code back down the channel --- aqt/webview.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aqt/webview.py b/aqt/webview.py index 31022ff96..9632c2e07 100644 --- a/aqt/webview.py +++ b/aqt/webview.py @@ -63,7 +63,8 @@ class AnkiWebPage(QWebEnginePage): return False def _onCmd(self, str): - self._onBridgeCmd(str) + from aqt import mw + mw.progress.timer(1, lambda: self._onBridgeCmd(str), False) # Main web view ##########################################################################