{
  "id": "python/flask-method-not-allowed",
  "signature": "werkzeug.exceptions.MethodNotAllowed: 405 Method Not Allowed: The method is not allowed for the requested URL",
  "signature_zh": "Werkzeug异常：405方法不允许：请求的URL不允许使用该方法",
  "regex": "werkzeug\\.exceptions\\.MethodNotAllowed:\\ 405\\ Method\\ Not\\ Allowed:\\ The\\ method\\ is\\ not\\ allowed\\ for\\ the\\ requested\\ URL",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The HTTP method used in the request is not allowed for the route (e.g., POST on a GET-only route).",
  "root_cause_type": "generic",
  "root_cause_zh": "请求中使用的HTTP方法不被路由允许（例如，在仅接受GET的路由上使用POST）。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Changing the request method without checking the route",
      "why_fails": "May cause other errors if the route expects specific methods.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "Adding a catch-all route without methods",
      "why_fails": "Can override intended behavior and cause security issues.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Add the correct method to the route decorator",
      "success_rate": 0.95,
      "how": "@app.route('/login', methods=['GET', 'POST'])\ndef login():\n    return \"Login page\"",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use the correct HTTP method in the request",
      "success_rate": 0.9,
      "how": "curl -X POST http://localhost:5000/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.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-03-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}