{
  "id": "python/aiohttp-clientpayloaderror",
  "signature": "aiohttp.client_exceptions.ClientPayloadError: Response payload is not completed",
  "signature_zh": "aiohttp.client_exceptions.ClientPayloadError: 响应负载未完成",
  "regex": "aiohttp\\.client_exceptions\\.ClientPayloadError:\\ Response\\ payload\\ is\\ not\\ completed",
  "domain": "python",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "The server closed the connection mid-body, or the response body was read twice, or streaming was interrupted.",
  "root_cause_type": "generic",
  "root_cause_zh": "服务器在响应体中间关闭了连接，或响应体被读取两次，或流式传输被中断。",
  "versions": [
    {
      "version": "3.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "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"
    },
    {
      "version": "3.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The body is consumed once; second call raises the same error.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The connection is already closed; timeout doesn't matter.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Server-side framing, not client-controlled.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.92,
      "how": "Read the body once and cache:\n\nasync with session.get(url) as resp:\n    body = await resp.read()\n    data = json.loads(body)",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.88,
      "how": "Retry the request on ClientPayloadError with backoff.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "Use resp.content.iter_chunked() for large payloads to detect partial reads early.",
      "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.85,
  "fix_success_rate": 0.8,
  "resolvable": "partial",
  "first_seen": "2024-11-04",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}