{
  "id": "python/django-session-serialization-error",
  "signature": "django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, but settings are not configured.",
  "signature_zh": "django.core.exceptions.ImproperlyConfigured: 请求设置DEFAULT_INDEX_TABLESPACE，但设置未配置。",
  "regex": "django\\.core\\.exceptions\\.ImproperlyConfigured:\\ Requested\\ setting\\ DEFAULT_INDEX_TABLESPACE,\\ but\\ settings\\ are\\ not\\ configured\\.",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "Accessing Django settings before django.setup() is called, often in standalone scripts.",
  "root_cause_type": "generic",
  "root_cause_zh": "在调用django.setup()之前访问Django设置，通常发生在独立脚本中。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Breaks configuration management and may cause inconsistencies.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Still fails because settings are not loaded.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Add `import django; django.setup()` at the beginning of the script.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Use `os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myproject.settings')` before importing.",
      "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.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-06-25",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}