{
  "id": "python/django-query-parameter-type-error",
  "signature": "TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'",
  "signature_zh": "TypeError: int()参数必须是字符串、类似字节的对象或数字，而不是'NoneType'",
  "regex": "TypeError:\\ int\\(\\)\\ argument\\ must\\ be\\ a\\ string,\\ a\\ bytes\\-like\\ object\\ or\\ a\\ number,\\ not\\ 'NoneType'",
  "domain": "python",
  "category": "type_error",
  "subcategory": null,
  "root_cause": "Accessing a query parameter that is missing, and trying to convert it to int without a default.",
  "root_cause_type": "generic",
  "root_cause_zh": "访问缺失的查询参数，并在没有默认值的情况下尝试将其转换为int。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "If the parameter is missing, get() returns None, causing TypeError.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "May lead to unexpected behavior or silent failures.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Use request.GET.get('param', 0) to provide a default value.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Use try-except with int() and handle ValueError/TypeError.",
      "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-02-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}