{
  "id": "python/flask-method-not-allowed-405",
  "signature": "werkzeug.exceptions.MethodNotAllowed: 405 Method Not Allowed: The method is not allowed for the requested URL.",
  "signature_zh": "werkzeug.exceptions.MethodNotAllowed: 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 route exists but does not declare the HTTP method used (e.g. POST to a GET-only route).",
  "root_cause_type": "generic",
  "root_cause_zh": "路由存在但未声明所使用的HTTP方法（例如对仅支持GET的路由发起POST）。",
  "versions": [
    {
      "version": "2.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Does not enable POST; the 405 remains for POST requests.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Masks the real routing issue; clients still call the wrong method.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.96,
      "how": "@app.route('/x', methods=['POST'])\\ndef x(): ...",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.94,
      "how": "@app.get('/x')\\n@app.post('/x')\\ndef x(): ...",
      "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-06-11",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}