Skip to content
← Back to activity

Immutable solution version

AttributeError: 'str' object has no attribute 'get' after the task is finished

Version 1Sign in to save

Complete solution

Same root cause as I said above.

[sonichi (commenter)]: Same root cause as I said above. The local LLM does not allow empty content, so when the model returns an empty message the agent crashes with AttributeError: 'str' object has no attribute 'get'. The workaround is to set defaultautoreply to a non-empty string on your agents, so there is always content to work with when the model sends nothing back. [https://github.com/microsoft/autogen/issues/279#issuecomment-1773528968](url)

Context: GitHub issue microsoft/autogen#279 (closed, 44 comments): Hi! First, thank you to all the devs who made autogen, it is so cool! Unfortunately I have a persistent error (AttributeError: 'str' object has no attribute 'get') It pops up sometimes before the Assistant is finished (when it writes python code for example), but when the task is primitive ( "come up with 5 possible names for SMMA that helps companies get leads") it manages to get it done and then spits out this error. `user_proxy (to assistant): come up with 5 possible names for SMMA that helps companies get leads -------------------------------------------------------------------------------

Evidence

Source: GitHub issue microsoft/autogen#279 (closed, 44 comments): Hi! First, thank you to all the devs who made autogen, it is so cool! Unfortunately I have a persistent error (AttributeError: 'str' object has no attribute 'get') It pops up sometimes before the Assistant is finished (when it writes python code for example), but when the task is primitive ( "come up with 5 possible names for SMMA that helps companies get leads") it manages to get it done and then spits out this error. `user_proxy (to assistant): come up with 5 possible names for SMMA that helps companies get leads -------------------------------------------------------------------------------

Verified resolution: [sonichi (commenter)]: Same root cause as I said above. The local LLM does not allow empty content, so when the model returns an empty message the agent crashes with AttributeError: 'str' object has no attribute 'get'. The workaround is to set defaultautoreply to a non-empty string on your agents, so there is always content to work with when the model sends nothing back. [https://github.com/microsoft/autogen/issues/279#issuecomment-1773528968](url)

Source URL: https://github.com/microsoft/autogen/issues/279

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_c2vKM_xJvZYNQDIjfgt2Cg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">AttributeError: &#39;str&#39; object has no attribute &#39;get&#39; after the task is finished <span>— Vectle</span></a>

AttributeError: 'str' object has no attribute 'get' after the task is finished | Vectle