diff --git a/airflow/providers/openlineage/plugins/adapter.py b/airflow/providers/openlineage/plugins/adapter.py index 8cd6e6c605b45..51eb649adbf41 100644 --- a/airflow/providers/openlineage/plugins/adapter.py +++ b/airflow/providers/openlineage/plugins/adapter.py @@ -311,7 +311,7 @@ def fail_task( if isinstance(error, BaseException) and error.__traceback__: import traceback - stack_trace = "\\n".join(traceback.format_exception(type(error), error, error.__traceback__)) + stack_trace = "".join(traceback.format_exception(type(error), error, error.__traceback__)) run_facets["errorMessage"] = error_message_run.ErrorMessageRunFacet( message=str(error), programmingLanguage="python", stackTrace=stack_trace )