{
  "id": "python/sqlalchemy-connection-ssl-error",
  "signature": "sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name \"db.example.com\" to address: Temporary failure in name resolution",
  "signature_zh": "sqlalchemy.exc.OperationalError：(psycopg2.OperationalError) 无法将主机名 \"db.example.com\" 转换为地址：名称解析临时失败",
  "regex": "sqlalchemy\\.exc\\.OperationalError:\\ \\(psycopg2\\.OperationalError\\)\\ could\\ not\\ translate\\ host\\ name\\ \"db\\.example\\.com\"\\ to\\ address:\\ Temporary\\ failure\\ in\\ name\\ resolution",
  "domain": "python",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "DNS resolution failure for database hostname.",
  "root_cause_type": "generic",
  "root_cause_zh": "数据库主机名的 DNS 解析失败。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Hardcoding IP address in connection string.",
      "why_fails": "IP may change; not portable.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "Increasing connection timeout.",
      "why_fails": "DNS failure persists regardless of timeout.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Check DNS configuration and network connectivity.",
      "success_rate": 0.9,
      "how": "nslookup db.example.com\nping db.example.com",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use IP address temporarily and fix DNS.",
      "success_rate": 0.85,
      "how": "engine = create_engine('postgresql://user:pass@192.168.1.100/dbname')",
      "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": "true",
  "first_seen": "2025-11-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}