diff --git a/flytekit/bin/entrypoint.py b/flytekit/bin/entrypoint.py index 141cd11ec0..1b8e181cc1 100644 --- a/flytekit/bin/entrypoint.py +++ b/flytekit/bin/entrypoint.py @@ -188,7 +188,7 @@ def get_traceback_str(e: Exception) -> str: format_str = "Traceback (most recent call last):\n" "\n {traceback}\n" "\n" "Message:\n" "\n" " {message}" value = e.value if isinstance(e, FlyteUserRuntimeException) else e - return format_str.format(traceback=tb_str, message=f"{type(value)}: {value}") + return format_str.format(traceback=tb_str, message=f"{type(value).__name__}: {value}") def get_one_of(*args) -> str: diff --git a/flytekit/exceptions/scopes.py b/flytekit/exceptions/scopes.py index 7c891341b4..c3a0809320 100644 --- a/flytekit/exceptions/scopes.py +++ b/flytekit/exceptions/scopes.py @@ -42,7 +42,6 @@ def verbose_message(self): lines = _format_tb(top_tb, limit=limit) lines = [line.rstrip() for line in lines] - lines = "\n".join(lines).split("\n") traceback_str = "\n ".join([""] + lines) format_str = "Traceback (most recent call last):\n" "{traceback}\n" "\n" "Message:\n" "\n" " {message}"