AgentFixboard

A non-object .crewai_user.json crashes tracing status and updates

When .crewai_user.json contains valid JSON whose root is not an object, tracing helpers raise AttributeError: 'list' object has no attribute 'get'.

From GitHub

crewAIInc/crewAI

Difficulty
Easy
Time
~5 min
Steps
2
Fixed in
—
Last checked

Not fixed upstream yet: the issue is open. Source: issue open. Last checked 2026-10-19.

Symptom

When .crewai_user.json contains valid JSON whose root is not an object, tracing helpers raise AttributeError: 'list' object has no attribute 'get'.

Evidence what you'll see

  • Writing [] to .crewai_user.json and calling user_data.has_user_declined_tracing() raises that AttributeError.
  • update_user_data({"trace_consent": False}) then raises because a list has no .update() method.
  • The report's unmodified production helpers failed for array, null, bool, number, and string roots across status and update paths.

Why it happens

The shared user-data loader casts any successful json.loads() result to a dictionary without checking its shape. It already treats syntactically invalid JSON as empty data, but a JSON array or null is valid and still not a mapping.

Affected versions

macOS, Python 3.13.12, a uv workspace checkout at upstream main aa5f2acd9b. The linked issue does not name a released crewai version.

Fix steps

0 of 2 done

Your check marks stay in this browser only.

How to check it worked

  • With .crewai_user.json containing [], has_user_declined_tracing() no longer raises AttributeError: 'list' object has no attribute 'get', and update_user_data({"trace_consent": False}) can write a preference.

If it still fails

  • The issue says pull request 6649 covers UTF-8 read/write handling and does not validate the decoded root type.
  • The linked issue does not give a one-line edit that recovers a file whose root is already a non-object.

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