{
  "id": "python/fastapi-email-validator-missing",
  "signature": "ImportError: email-validator is not installed, run `pip install pydantic[email]`",
  "signature_zh": "ImportError: 未安装 email-validator，请运行 `pip install pydantic[email]`",
  "regex": "ImportError:\\ email\\-validator\\ is\\ not\\ installed,\\ run\\ `pip\\ install\\ pydantic\\[email\\]`",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "A model uses pydantic EmailStr but the optional email-validator dependency is not installed.",
  "root_cause_type": "generic",
  "root_cause_zh": "模型使用了 pydantic 的 EmailStr，但未安装可选的 email-validator 依赖。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Removes validation; invalid emails pass through.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Base pydantic does not bundle email-validator.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Install the extra:\npip install 'pydantic[email]'",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Add email-validator to requirements and rebuild the image.",
      "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.9,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-03-27",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}