X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.pythonlink%2Fsrc%2Forg%2Fsimantics%2Fpythonlink%2FPythonContext.java;fp=org.simantics.pythonlink%2Fsrc%2Forg%2Fsimantics%2Fpythonlink%2FPythonContext.java;h=77701ef5b352423e18d66ae90790dc296c178091;hb=d71490fa46106b0502ee3b903793a16a3bb6f68b;hp=cceace3c4d1b2bf9b372eeb4182d50eede2ba794;hpb=d556dfd2739c43551c894dd636bf8e0735fbad55;p=simantics%2Fpython.git diff --git a/org.simantics.pythonlink/src/org/simantics/pythonlink/PythonContext.java b/org.simantics.pythonlink/src/org/simantics/pythonlink/PythonContext.java index cceace3..77701ef 100644 --- a/org.simantics.pythonlink/src/org/simantics/pythonlink/PythonContext.java +++ b/org.simantics.pythonlink/src/org/simantics/pythonlink/PythonContext.java @@ -57,6 +57,10 @@ public class PythonContext implements Closeable { }; private static synchronized void ensurePythonInit() { + if (!Activator.isPythonLoaded()) { + throw new PythonException("Python interpreter has not been successfully loaded. Check availablility of python3.dll in path."); + } + if (!isPyInitialized) { execute(() -> initializePython(pythonWriter)); isPyInitialized = true;