diff --git a/src/Base/Interpreter.cpp b/src/Base/Interpreter.cpp index f9853c1659..00c621d780 100644 --- a/src/Base/Interpreter.cpp +++ b/src/Base/Interpreter.cpp @@ -126,6 +126,7 @@ void PyException::ReportException () const if (!_isReported) { _isReported = true; // set sys.last_vars to make post-mortem debugging work + PyGILStateLocker locker; PySys_SetObject("last_traceback", PP_last_traceback); Base::Console().DeveloperError("pyException","%s%s: %s\n", _stackTrace.c_str(), _errorType.c_str(), what());