diff --git a/cosmos/operators/local.py b/cosmos/operators/local.py index a593101fc..1c00f476c 100644 --- a/cosmos/operators/local.py +++ b/cosmos/operators/local.py @@ -11,6 +11,7 @@ import warnings import airflow +import jinja2 import yaml from airflow import DAG from airflow.compat.functools import cached_property @@ -283,7 +284,7 @@ def calculate_openlineage_events_completes( try: events = openlineage_processor.parse() self.openlineage_events_completes = events.completes - except (FileNotFoundError, NotImplementedError, ValueError, KeyError): + except (FileNotFoundError, NotImplementedError, ValueError, KeyError, jinja2.exceptions.UndefinedError): logger.debug("Unable to parse OpenLineage events", stack_info=True) def get_datasets(self, source: Literal["inputs", "outputs"]) -> list[Dataset]: