{
  "id": "python/aiohttp-client-response-not-consumed",
  "signature": "aiohttp.client_exceptions.ClientResponseError: Response not consumed",
  "signature_zh": "aiohttp 客户端异常：响应未消耗",
  "regex": "aiohttp\\.client_exceptions\\.ClientResponseError:\\ Response\\ not\\ consumed",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The response body was not fully read or released before the session is closed, causing a leak.",
  "root_cause_type": "generic",
  "root_cause_zh": "在会话关闭前未完全读取或释放响应体，导致资源泄漏。",
  "versions": [
    {
      "version": "3.9",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Calling resp.release() but not reading the body",
      "why_fails": "release() does not consume the body; it only releases the connection. The response remains unconsumed.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "Using resp.text() with a timeout that is too short",
      "why_fails": "If the timeout expires, the body may be partially read, leaving the response unconsumed.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Always read the response body using async with",
      "success_rate": 0.95,
      "how": "async with session.get(url) as resp:\n    data = await resp.text()",
      "condition": "",
      "sources": []
    },
    {
      "action": "Explicitly consume the response with resp.read()",
      "success_rate": 0.9,
      "how": "resp = await session.get(url)\nawait resp.read()  # or resp.release() after reading",
      "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.82,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-04-20",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}