Agent FixboardAgentFixboard

'str' object has no attribute 'get' when the chat finishes

The assistant's answer prints, then the run raises AttributeError: 'str' object has no attribute 'get'.

From GitHub

microsoft/autogen

Difficulty
Moderate
Time
~15 min
Steps
3
Fixed in
v0.2.1
Last checked

Verified fix: PR #849 merged on . Fixed in v0.2.1 (first published release whose tag contains the merge commit). Last checked .

Symptom

The assistant's answer prints, then the run raises AttributeError: 'str' object has no attribute 'get'.

Evidence what you'll see

  • The server log in the report is [ERROR] Error: 'messages' array must only contain objects with a 'content' field that is not empty.
  • The traceback reaches error_data.get("code") inside handle_error_response.
  • Pull request #757 says the endpoint's error field was a string, where the client expected an object.

Why it happens

The client reads an error payload with .get, which only works when that payload is an object. Pull request #757 says the failure showed up when a compatible endpoint put a string in error. The same report's server also rejected the chat because a message had empty content. The maintainer said a local endpoint does not allow empty content, and the user proxy falls back to default_auto_reply when the message it received contains no code. An empty fallback becomes the empty content the server rejects, and the string error that comes back then crashes .get.

Affected versions

The linked issue does not name an AutoGen version. The traceback is a Windows path under Anaconda. Comments describe a local endpoint.

Fix steps

0 of 3 done

Your check marks stay in this browser only.

How to check it worked

  • Run the same chat. It should finish without AttributeError: 'str' object has no attribute 'get'. The reporter who removed llm_config said the error was gone.

If it still fails

  • That reporter then saw the two assistants send the same code back and forth. The maintainer said the user proxy is not supposed to send code. It uses default_auto_reply when the received message has no code.
  • A later comment says the attribute error was still happening after the default_auto_reply suggestion. The linked issue does not give a further command for that case.

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change

Hit an error we don't cover? Submit it