{
  "id": "python/sqlalchemy-mutable-default-list",
  "signature": "sqlalchemy.exc.ArgumentError: Mutable default <list object at 0x...> for column 'tags' is not allowed. Use a callable instead.",
  "signature_zh": "列 'tags' 的可变默认值 <list object at 0x...> 不允许。请使用可调用对象。",
  "regex": "sqlalchemy\\.exc\\.ArgumentError:\\ Mutable\\ default\\ <list\\ object\\ at\\ 0x\\.\\.\\.>\\ for\\ column\\ 'tags'\\ is\\ not\\ allowed\\.\\ Use\\ a\\ callable\\ instead\\.",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "Using a mutable object (like list or dict) as a default value in a Column, which can lead to shared state across instances.",
  "root_cause_type": "generic",
  "root_cause_zh": "在 Column 中使用可变对象（如列表或字典）作为默认值，可能导致实例间共享状态。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Lambda is not serializable and may cause issues with migrations.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Tuple is immutable but may not be suitable for all use cases.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "class Article(Base):\n    __tablename__ = 'articles'\n    tags = Column(JSON, default=list)  # or default=lambda: []",
      "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.9,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-07-19",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}