{
  "id": "python/sqlalchemy-exc-statement-error-syntax",
  "signature": "sqlalchemy.exc.StatementError: (builtins.KeyError) 'name'",
  "signature_zh": "键错误：'name'",
  "regex": "sqlalchemy\\.exc\\.StatementError:\\ \\(builtins\\.KeyError\\)\\ 'name'",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "A SQL statement or ORM query references a column or attribute that does not exist in the model or database table.",
  "root_cause_type": "generic",
  "root_cause_zh": "SQL 语句或 ORM 查询引用了模型或数据库表中不存在的列或属性。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Adding column to model only",
      "why_fails": "",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "Switching to raw SQL",
      "why_fails": "",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Add missing column via migration",
      "success_rate": 0.95,
      "how": "Check the model definition and database schema to ensure the column exists, then add it via migration if missing.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use correct column name",
      "success_rate": 0.9,
      "how": "Correct the query to use existing column names, e.g., user.username instead of user.name.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.83,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-03-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}