{
  "id": "python/pip-connection-broken-incompleteread",
  "signature": "pip._vendor.urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(0 bytes read, 12345 more expected)', IncompleteRead(0 bytes read, 12345 more expected))",
  "signature_zh": "pip._vendor.urllib3.exceptions.ProtocolError：('连接中断：IncompleteRead（已读取 0 字节，预期还需 12345 字节）', IncompleteRead(...))",
  "regex": "pip\\._vendor\\.urllib3\\.exceptions\\.ProtocolError:\\ \\('Connection\\ broken:\\ IncompleteRead\\(0\\ bytes\\ read,\\ 12345\\ more\\ expected\\)',\\ IncompleteRead\\(0\\ bytes\\ read,\\ 12345\\ more\\ expected\\)\\)",
  "domain": "python",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "The download connection was cut mid-transfer by a proxy, firewall, flaky network, or a CDN edge — pip received fewer bytes than the Content-Length promised.",
  "root_cause_type": "generic",
  "root_cause_zh": "下载连接在传输中途被代理、防火墙、不稳定网络或 CDN 边缘节点切断——pip 收到的字节数少于 Content-Length 承诺的数量。",
  "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": "Transient but recurs on large packages; wastes time and bandwidth.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The failure is a truncated body, not a certificate problem.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Doesn't address proxy/network truncation.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.75,
      "how": "pip install --timeout 120 --retries 10 <pkg>",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "pip download --no-deps <pkg> -d ./wheels\n# or\ncurl -L --retry 5 -o ./wheels/<wheel> https://files.pythonhosted.org/...\npip install --no-index --find-links ./wheels <pkg>",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.7,
      "how": "pip install -i https://pypi.tuna.tsinghua.edu.cn/simple <pkg>\n# or your org's mirror",
      "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.83,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-08-05",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}