The message_logger instance in agents/ansari.py can be initialized as None. It seems like there's an expectation that message_logger should be checked before use, but this check is missing in some places like: line 254 and Line 261.
If this isn't addressed, it might lead to AttributeError: 'NoneType' object has no attribute 'log' when a None value is passed as the message_logger.
The
message_logger
instance in agents/ansari.py can be initialized asNone
. It seems like there's an expectation that message_logger should be checked before use, but this check is missing in some places like: line 254 and Line 261.If this isn't addressed, it might lead to
AttributeError: 'NoneType' object has no attribute 'log'
when aNone
value is passed as themessage_logger
.