{
  "id": "python/django-form-invalid-choice",
  "signature": "django.core.exceptions.ValidationError: ['Select a valid choice. 5 is not one of the available choices.']",
  "signature_zh": "django.core.exceptions.ValidationError: ['选择一个有效的选项。5不是可用选项之一。']",
  "regex": "django\\.core\\.exceptions\\.ValidationError:\\ \\['Select\\ a\\ valid\\ choice\\.\\ 5\\ is\\ not\\ one\\ of\\ the\\ available\\ choices\\.'\\]",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "Form field with choices receives a value not in the choices list.",
  "root_cause_type": "generic",
  "root_cause_zh": "带有choices的表单字段接收到不在choices列表中的值。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "May not be a valid option; hardcoding invalid values.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Loses functionality; users cannot select valid options.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Ensure the submitted value is in the choices: if value in dict(choices): ...",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Use a ModelChoiceField for dynamic choices.",
      "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.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-02-14",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}