{
  "id": "python/httpx-connecterror-ssl-wrong-version",
  "signature": "httpx.ConnectError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1123) while connecting to 'http://api.example.com'",
  "signature_zh": "httpx.ConnectError: [SSL: WRONG_VERSION_NUMBER] 版本号错误 (_ssl.c:1123)，连接到'http://api.example.com'时",
  "regex": "httpx\\.ConnectError:\\ \\[SSL:\\ WRONG_VERSION_NUMBER\\]\\ wrong\\ version\\ number\\ \\(_ssl\\.c:1123\\)\\ while\\ connecting\\ to\\ 'http://api\\.example\\.com'",
  "domain": "python",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "Attempting to use HTTPS on a plain HTTP port, or vice versa, causing SSL handshake failure.",
  "root_cause_type": "generic",
  "root_cause_zh": "尝试在普通HTTP端口上使用HTTPS，反之亦然，导致SSL握手失败。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Disabling SSL verification",
      "why_fails": "The issue is not certificate validation but protocol mismatch; disabling SSL does not help.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Using a different SSL/TLS version in the client",
      "why_fails": "The server likely does not support SSL on that port at all.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use the correct protocol (http vs https) matching the server configuration",
      "success_rate": 0.95,
      "how": "httpx.get('http://api.example.com')  # if server uses HTTP, not HTTPS",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use the correct port explicitly",
      "success_rate": 0.9,
      "how": "httpx.get('https://api.example.com:443')  # ensure port 443 for HTTPS",
      "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.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-10-05",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}