{
  "id": "python/flask-werkzeug-build-error",
  "signature": "werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'user_profile' with values ['user_id']. Did you mean 'user' instead?",
  "signature_zh": "Werkzeug 路由异常：无法为端点 'user_profile' 构建 URL，值为 ['user_id']。您是指 'user' 吗？",
  "regex": "werkzeug\\.routing\\.exceptions\\.BuildError:\\ Could\\ not\\ build\\ url\\ for\\ endpoint\\ 'user_profile'\\ with\\ values\\ \\['user_id'\\]\\.\\ Did\\ you\\ mean\\ 'user'\\ instead\\?",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The endpoint name or parameters provided to url_for do not match any registered route.",
  "root_cause_type": "generic",
  "root_cause_zh": "提供给 url_for 的端点名称或参数与任何已注册的路由不匹配。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Using url_for with wrong parameter names",
      "why_fails": "Parameter names must match the route exactly.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Assuming the endpoint name is the function name",
      "why_fails": "Endpoint names can be customized.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Check the endpoint name and parameters",
      "success_rate": 0.95,
      "how": "print(app.url_map)  # list all routes\nurl_for('user_profile', user_id=123)  # correct usage",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use the endpoint parameter in route decorator",
      "success_rate": 0.9,
      "how": "@app.route('/user/<int:user_id>', endpoint='user_profile')\ndef user(user_id):\n    return ...",
      "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": "2024-11-20",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}