mirror of
https://github.com/microsoft/autogen.git
synced 2025-12-12 15:31:21 +00:00
Fix AttributeError: 'NoneType' object has no attribute 'name' (#3127)
There is a bug related to the interplay between the society of mind agent and the FileLogger, probably somewhere around https://github.com/microsoft/autogen/blob/main/autogen/agentchat/contrib/society_of_mind_agent.py#L181, which causes an empty name property to be sent. The FileLogger should gracefully handle this circumstance and not return an error to the function caller. Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
This commit is contained in:
parent
ece69249e4
commit
ddc2eaae88
@ -90,7 +90,7 @@ class FileLogger(BaseLogger):
|
||||
thread_id = threading.get_ident()
|
||||
source_name = None
|
||||
if isinstance(source, str):
|
||||
source_name = source
|
||||
source_name = getattr(source, "name", "unknown")
|
||||
else:
|
||||
source_name = source.name
|
||||
try:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user