From d325c42f8b995c99ee027495013c982a941df40f Mon Sep 17 00:00:00 2001 From: MilesCranmer Date: Fri, 26 Jan 2024 13:50:28 +0900 Subject: [PATCH] Fix environ assertion --- pysr/julia_helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pysr/julia_helpers.py b/pysr/julia_helpers.py index 798890ad4..301344c79 100644 --- a/pysr/julia_helpers.py +++ b/pysr/julia_helpers.py @@ -3,7 +3,7 @@ import warnings # Required to avoid segfaults (https://juliapy.github.io/PythonCall.jl/dev/faq/) -if os.environ["PYTHON_JULIACALL_HANDLE_SIGNALS"] not in {"yes", ""}: +if os.environ.get("PYTHON_JULIACALL_HANDLE_SIGNALS", "yes") != "yes": warnings.warn( "PYTHON_JULIACALL_HANDLE_SIGNALS environment variable is set to something other than 'yes' or ''. " + "You will experience segfaults if running with multithreading."