{
  "id": "python/fastapi-path-parameter-conversion-error",
  "signature": "fastapi.exceptions.RequestValidationError: 1 validation error for Request\\npath -> item_id\\n  value is not a valid integer (type=type_error.integer)",
  "signature_zh": "FastAPI 请求验证错误：路径参数 item_id 不是有效的整数",
  "regex": "fastapi\\.exceptions\\.RequestValidationError:\\ 1\\ validation\\ error\\ for\\ Request\\\\npath\\ \\->\\ item_id\\\\n\\ \\ value\\ is\\ not\\ a\\ valid\\ integer\\ \\(type=type_error\\.integer\\)",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "路径参数类型与声明不符。",
  "root_cause_type": "generic",
  "root_cause_zh": "路径参数类型与声明不符。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "失去类型验证。",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "容易出错。",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "@app.get('/items/{item_id}')\\nasync def get_item(item_id: int):\\n    return {'item_id': item_id}",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "from fastapi import Path\\nitem_id: int = Path(..., ge=1)",
      "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.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-10-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}