{
  "id": "python/sqlalchemy-unknown-type",
  "signature": "sqlalchemy.exc.CompileError: Unsupported type: <class 'sqlalchemy.dialects.postgresql.JSONB'>. Cannot compile this type.",
  "signature_zh": "SQLAlchemy 编译错误：不支持的类型：JSONB，无法编译。",
  "regex": "sqlalchemy\\.exc\\.CompileError:\\ Unsupported\\ type:\\ <class\\ 'sqlalchemy\\.dialects\\.postgresql\\.JSONB'>\\.\\ Cannot\\ compile\\ this\\ type\\.",
  "domain": "python",
  "category": "type_error",
  "subcategory": null,
  "root_cause": "使用的数据库方言不支持 JSONB 类型，或未正确导入。",
  "root_cause_type": "generic",
  "root_cause_zh": "使用的数据库方言不支持 JSONB 类型，或未正确导入。",
  "versions": [
    {
      "version": "1.4.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "2.0.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "改用 Text 类型，但丢失了 JSON 的查询能力。",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "尝试在 MySQL 中使用 JSONB，但 MySQL 不支持该类型。",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "确保使用 PostgreSQL 数据库，并从 sqlalchemy.dialects.postgresql 导入 JSONB。",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "对于其他数据库，使用 JSON 类型，例如：from sqlalchemy import JSON",
      "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.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-02-11",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}