{
  "id": "python/flask-url-for-external-scheme",
  "signature": "werkzeug.routing.BuildError: Could not build url for endpoint 'external' with values ['scheme', 'host']. Did you mean 'index' instead?",
  "signature_zh": "Werkzeug 路由错误：无法为端点 'external' 构建 URL，包含值 ['scheme', 'host']。你是想用 'index' 吗？",
  "regex": "werkzeug\\.routing\\.BuildError:\\ Could\\ not\\ build\\ url\\ for\\ endpoint\\ 'external'\\ with\\ values\\ \\['scheme',\\ 'host'\\]\\.\\ Did\\ you\\ mean\\ 'index'\\ instead\\?",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Attempting to use url_for with an endpoint that doesn't exist or with extra parameters not defined in the 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": "",
      "why_fails": "The endpoint still doesn't exist; _external only affects the URL scheme.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "These are not valid parameters for route building unless defined in the route.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 1.0,
      "how": "Define the route correctly: @app.route('/external') def external(): return 'ok', then use url_for('external')",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.8,
      "how": "If external URL needed, use url_for('index', _external=True) if index exists",
      "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": "2024-09-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}