{
  "id": "python/sqlalchemy-type-error-mapping",
  "signature": "sqlalchemy.exc.ArgumentError: The 'type' argument of Column() should be a TypeEngine, not a <class 'str'>",
  "signature_zh": "sqlalchemy.exc.ArgumentError：Column() 的 'type' 参数应为 TypeEngine，而不是 <class 'str'>",
  "regex": "sqlalchemy\\.exc\\.ArgumentError:\\ The\\ 'type'\\ argument\\ of\\ Column\\(\\)\\ should\\ be\\ a\\ TypeEngine,\\ not\\ a\\ <class\\ 'str'>",
  "domain": "python",
  "category": "type_error",
  "subcategory": null,
  "root_cause": "Passing a string instead of a SQLAlchemy type object to Column.",
  "root_cause_type": "generic",
  "root_cause_zh": "向 Column 传递字符串而不是 SQLAlchemy 类型对象。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Using string like 'Integer' as type.",
      "why_fails": "Must import and use Integer class.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Using type as positional argument incorrectly.",
      "why_fails": "Column expects type as first positional arg; wrong order causes error.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use proper SQLAlchemy type.",
      "success_rate": 0.95,
      "how": "from sqlalchemy import Column, Integer, String\nColumn('id', Integer, primary_key=True)",
      "condition": "",
      "sources": []
    },
    {
      "action": "Check import statements.",
      "success_rate": 0.9,
      "how": "from sqlalchemy.types import Integer, String",
      "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.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-01-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}