Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AttributeError: 'NoneType' object has no attribute 'name' #3127

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

drewgillson
Copy link
Contributor

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.

Why are these changes needed?

Related issue number

Checks

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.
Copy link
Contributor

@sonichi sonichi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an error in the change. It'll be good to write a simple test to cover the case.

autogen/logger/file_logger.py Show resolved Hide resolved
@sonichi sonichi requested review from bboynton97 and Hk669 July 13, 2024 23:26
@codecov-commenter
Copy link

codecov-commenter commented Jul 13, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 42.45%. Comparing base (6aaa238) to head (9396ef6).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
autogen/logger/file_logger.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3127      +/-   ##
==========================================
+ Coverage   33.24%   42.45%   +9.21%     
==========================================
  Files          99       99              
  Lines       11016    11016              
  Branches     2365     2537     +172     
==========================================
+ Hits         3662     4677    +1015     
+ Misses       7026     5906    -1120     
- Partials      328      433     +105     
Flag Coverage Δ
unittests 42.41% <0.00%> (+9.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Hk669
Copy link
Contributor

Hk669 commented Jul 14, 2024

@drewgillson thanks for spotting the bug.

Copy link

gitguardian bot commented Jul 20, 2024

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
Once a secret has been leaked into a git repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@jackgerrits
Copy link
Member

Thanks for the fix @drewgillson !

@jackgerrits jackgerrits added this pull request to the merge queue Sep 25, 2024
Merged via the queue into microsoft:main with commit ddc2eaa Sep 25, 2024
142 of 154 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants