{
  "id": "python/flask-url-for-endpoint-not-found",
  "signature": "werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'user_profile'. Did you forget to specify values for 'user_id'?",
  "signature_zh": "werkzeug.routing.exceptions.BuildError: 无法为端点'user_profile'构建 URL。是否忘记为'user_id'指定值？",
  "regex": "werkzeug\\.routing\\.exceptions\\.BuildError:\\ Could\\ not\\ build\\ url\\ for\\ endpoint\\ 'user_profile'\\.\\ Did\\ you\\ forget\\ to\\ specify\\ values\\ for\\ 'user_id'\\?",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The url_for function is called for an endpoint that expects path parameters, but those parameters are not provided.",
  "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": "",
      "why_fails": "The route requires user_id, so it cannot build the URL.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Inconsistent endpoint names cause confusion and may lead to other BuildErrors.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 1.0,
      "how": "Provide required parameters: url_for('user_profile', user_id=123)",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.8,
      "how": "Make the parameter optional in the route definition: @app.route('/user/<int:user_id>', defaults={'user_id': 0})",
      "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.9,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-02-18",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}