From 19dcdd95c08f55b14e4c4d6e20721408c122560a Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Mon, 15 Jul 2019 20:04:44 +0100 Subject: [PATCH] Prevent PyQt from using its buggy exception logging by making it look like we're using custom exception handling. --- src/runner/pythonrunner.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/runner/pythonrunner.cpp b/src/runner/pythonrunner.cpp index ca908aa..cf2a8dd 100644 --- a/src/runner/pythonrunner.cpp +++ b/src/runner/pythonrunner.cpp @@ -1372,7 +1372,8 @@ bool PythonRunner::initPython(const QString &pythonPath) mainNamespace["moprivate"] = bpy::import("moprivate"); bpy::import("site"); bpy::exec("sys.stdout = moprivate.PrintWrapper()\n" - "sys.stderr = moprivate.ErrWrapper()\n", + "sys.stderr = moprivate.ErrWrapper()\n" + "sys.excepthook = lambda x, y, z: sys.__excepthook__(x, y, z)", mainNamespace); return true;