{
  "id": "python/starlette-static-files-error",
  "signature": "RuntimeError: Static files directory does not exist: /app/static",
  "signature_zh": "RuntimeError: 静态文件目录不存在: /app/static",
  "regex": "RuntimeError:\\ Static\\ files\\ directory\\ does\\ not\\ exist:\\ /app/static",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "Starlette 配置的静态文件目录路径不存在。",
  "root_cause_type": "generic",
  "root_cause_zh": "Starlette 配置的静态文件目录路径不存在。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "忽略错误，不创建目录，导致请求 404。",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "使用相对路径但工作目录不同。",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "尝试在运行时创建目录但权限不足。",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "确保目录存在，或在代码中自动创建。",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.95,
      "how": "使用绝对路径，基于 __file__ 计算。",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "检查部署环境中的目录权限。",
      "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": "2024-03-02",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}