{
  "id": "python/starlette-route-parameter-type-error",
  "signature": "TypeError: <lambda>() missing 1 required positional argument: 'item_id'",
  "signature_zh": "类型错误：<lambda>() 缺少 1 个必需的位置参数：'item_id'",
  "regex": "TypeError:\\ <lambda>\\(\\)\\ missing\\ 1\\ required\\ positional\\ argument:\\ 'item_id'",
  "domain": "python",
  "category": "type_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.route('/items/{item_id}')\\nasync def get_item(item_id: int):\\n    return {'item_id': item_id}",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "async def get_item(request):\\n    item_id = request.path_params['item_id']",
      "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.84,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-06-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}