diff --git a/load_env_vars.py b/load_env_vars.py index 47e82731..6b82f024 100644 --- a/load_env_vars.py +++ b/load_env_vars.py @@ -11,11 +11,15 @@ def load_env_vars() -> None: # FIXME: there is a dynamic way to do this """Load the environment variables from the config file.""" yaml = YAML() + config_file = "bridgeData.yaml" + template_file = "bridgeData_template.yaml" - if not pathlib.Path("bridgeData.yaml").exists(): - raise FileNotFoundError("bridgeData.yaml not found") + if not pathlib.Path(config_file).exists(): + if pathlib.Path(template_file).exists(): + raise FileNotFoundError(f"{template_file} found. Please set variables and rename it to {config_file}.") + raise FileNotFoundError(f"{config_file} not found") - with open("bridgeData.yaml", encoding="utf-8") as f: + with open(config_file, encoding="utf-8") as f: config = yaml.load(f) if "cache_home" in config: