{
  "id": "python/django-url-reverse-with-args",
  "signature": "django.urls.exceptions.NoReverseMatch: Reverse for 'product_detail' with arguments '('',)' not found. 1 pattern(s) tried: ['product/<int:pk>/']",
  "signature_zh": "URL 反向匹配错误：带参数 '('',)' 的 'product_detail' 反向查找失败。已尝试 1 个模式：['product/<int:pk>/']",
  "regex": "django\\.urls\\.exceptions\\.NoReverseMatch:\\ Reverse\\ for\\ 'product_detail'\\ with\\ arguments\\ '\\('',\\)'\\ not\\ found\\.\\ 1\\ pattern\\(s\\)\\ tried:\\ \\['product/<int:pk>/'\\]",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Passing an empty string or non-integer argument to reverse() for a URL pattern expecting int.",
  "root_cause_type": "generic",
  "root_cause_zh": "向期望整数的 URL 模式传递空字符串或非整数参数。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Using reverse('product_detail', args=[None]) doesn't convert None to int, still fails.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Changing URL pattern to string doesn't fix if you pass None.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Ensure argument is integer: reverse('product_detail', args=[int(pk)])",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "Provide default: reverse('product_detail', args=[pk or 0])",
      "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.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-11-05",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}