{
  "id": "python/flask-redirect-endpoint-not-found",
  "signature": "werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'login'. Did you mean 'register' instead?",
  "signature_zh": "Werkzeug 路由错误：无法为端点 'login' 构建 URL。您是指 'register' 吗？",
  "regex": "werkzeug\\.routing\\.exceptions\\.BuildError:\\ Could\\ not\\ build\\ url\\ for\\ endpoint\\ 'login'\\.\\ Did\\ you\\ mean\\ 'register'\\ instead\\?",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "在 url_for() 或 redirect() 中使用了不存在的端点名称。",
  "root_cause_type": "generic",
  "root_cause_zh": "在 url_for() 或 redirect() 中使用了不存在的端点名称。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "会破坏 Flask 的路由系统，且不灵活",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "会导致路由冲突，且不解决根本问题",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 1.0,
      "how": "@app.route('/login', endpoint='login')\ndef login_view():\n    pass\n# 然后在其他地方使用\nredirect(url_for('login'))",
      "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-09-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}