diff --git a/keep/parser/parser.py b/keep/parser/parser.py index 3d5921a98..72c30c7ad 100644 --- a/keep/parser/parser.py +++ b/keep/parser/parser.py @@ -255,7 +255,7 @@ def _parse_providers_from_env(self, context_manager: ContextManager): providers_json = os.environ.get("KEEP_PROVIDERS") # check if env var is absolute or relative path to a providers json file - if re.compile(r"^(\/|\.\/|\.\.\/).*\.json$").match( + if providers_json and re.compile(r"^(\/|\.\/|\.\.\/).*\.json$").match( providers_json ): with open(