diff --git a/app/formmain.pas b/app/formmain.pas index 2be37c94b10..d0af60bc54f 100644 --- a/app/formmain.pas +++ b/app/formmain.pas @@ -2302,9 +2302,10 @@ procedure TfmMain.InitPyEngine; PythonEngine.DllName:= ExtractFileName(UiOps.PyLibrary); PythonEngine.LoadDll; - try - GetPythonEngine.ExecString('import sys'); - except + if PythonOK then + GetPythonEngine.ExecString('import sys') + else + begin FConsoleMustShow:= true; fmConsole.DoLogConsoleLine(msgCannotInitPython1); fmConsole.DoLogConsoleLine(msgCannotInitPython2);