{
  "id": "python/starlette-missing-static-files",
  "signature": "FileNotFoundError: [Errno 2] No such file or directory: 'static/style.css'",
  "signature_zh": "文件未找到错误：没有这样的文件或目录：'static/style.css'",
  "regex": "FileNotFoundError:\\ \\[Errno\\ 2\\]\\ No\\ such\\ file\\ or\\ directory:\\ 'static/style\\.css'",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "Starlette static file mount expects the directory to exist; if the file is missing or path is incorrect, this error occurs.",
  "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": "Using a relative path that doesn't exist",
      "why_fails": "The path must be absolute or relative to the current working directory.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Not mounting the static files at all",
      "why_fails": "Static files won't be served.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Create the static directory and place files",
      "success_rate": 1.0,
      "how": "mkdir -p static\n# place style.css in static/",
      "condition": "",
      "sources": []
    },
    {
      "action": "Mount static files with correct path",
      "success_rate": 0.95,
      "how": "from starlette.staticfiles import StaticFiles\napp.mount('/static', StaticFiles(directory='static'), name='static')",
      "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-12-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}