From 3cd6902f1e6d72adcd65854c776e26cefe9b50b4 Mon Sep 17 00:00:00 2001 From: ReiHashimoto <42664619+ReiHashimoto@users.noreply.github.com> Date: Wed, 27 Mar 2024 21:56:29 +0900 Subject: [PATCH] check .env file existance --- studio/app/dir_path.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/studio/app/dir_path.py b/studio/app/dir_path.py index 4f36ddc94..8ea1af0fb 100644 --- a/studio/app/dir_path.py +++ b/studio/app/dir_path.py @@ -29,7 +29,8 @@ class DIRPATH: CONDAENV_DIR = ( f"{os.path.dirname(os.path.dirname(os.path.dirname(__file__)))}/conda" ) - load_dotenv(f"{CONFIG_DIR}/.env") + if os.path.isfile(f"{CONDAENV_DIR}/.env"): + load_dotenv(f"{CONFIG_DIR}/.env") SNAKEMAKE_FILEPATH = f"{APP_DIR}/Snakefile" EXPERIMENT_YML = "experiment.yaml"