{
  "id": "python/flask-url-for-external-endpoint",
  "signature": "werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'auth.login'. Did you mean 'login' instead?",
  "signature_zh": "Werkzeug 路由异常：无法为端点 'auth.login' 构建 URL。您是指 'login' 吗？",
  "regex": "werkzeug\\.routing\\.exceptions\\.BuildError:\\ Could\\ not\\ build\\ url\\ for\\ endpoint\\ 'auth\\.login'\\.\\ Did\\ you\\ mean\\ 'login'\\ instead\\?",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "在 url_for 中使用了不存在的端点名称，可能因为蓝图前缀错误或函数名拼写错误。",
  "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": "如果蓝图端点实际为 'auth.login'，使用 'login' 会继续报错。",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "如果蓝图未注册或名称错误，仍然无法构建。",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "from flask import Blueprint, url_for\nauth_bp = Blueprint('auth', __name__)\n@auth_bp.route('/login')\ndef login(): ...\napp.register_blueprint(auth_bp)\n# 使用 url_for('auth.login')",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "print(app.view_functions.keys())",
      "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.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-05-17",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}