From 6f4c117005e9f766bd7d63e72594d42095fdffe3 Mon Sep 17 00:00:00 2001 From: Igor Ilic <30923996+dexters1@users.noreply.github.com> Date: Tue, 8 Apr 2025 11:46:18 +0200 Subject: [PATCH] fix: Resolve issue with missing name if no attribute (#707) ## Description Resolve issue with missing name if no attribute ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin. --- cognee/shared/logging_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cognee/shared/logging_utils.py b/cognee/shared/logging_utils.py index 2a96c6f8c..4d2ee7f52 100644 --- a/cognee/shared/logging_utils.py +++ b/cognee/shared/logging_utils.py @@ -213,7 +213,8 @@ def setup_logging(log_level=None, name=None): else: exc_type, exc_value, tb = sys.exc_info() - event_dict["exception_type"] = exc_type.__name__ + if hasattr(exc_type, __name__): + event_dict["exception_type"] = exc_type.__name__ event_dict["exception_message"] = str(exc_value) event_dict["traceback"] = True