{
  "id": "python/starlette-path-operation-conflict",
  "signature": "ValueError: Duplicate param name 'item_id' in path operation",
  "signature_zh": "值错误：路径操作中存在重复的参数名称'item_id'",
  "regex": "ValueError:\\ Duplicate\\ param\\ name\\ 'item_id'\\ in\\ path\\ operation",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "Multiple path parameters in a route have the same name, causing ambiguity.",
  "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": "Removing one of the parameters without adjusting the route",
      "why_fails": "Breaks the route logic; URL pattern becomes incorrect.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Using different variable names but same path segment",
      "why_fails": "Starlette still sees duplicate path parameters.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Rename one of the path parameters to be unique",
      "success_rate": 0.95,
      "how": "@app.route('/items/{item_id}/details/{detail_id}')\nasync def get_detail(item_id: str, detail_id: str):\n    ...",
      "condition": "",
      "sources": []
    },
    {
      "action": "Combine parameters into a single path segment",
      "success_rate": 0.85,
      "how": "@app.route('/items/{item_id}')\nasync def get_item(item_id: str):\n    ...",
      "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.83,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-08-05",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}