{
  "id": "python/starlette-runtime-error-no-app",
  "signature": "RuntimeError: No application configured",
  "signature_zh": "运行时错误：未配置应用程序",
  "regex": "RuntimeError:\\ No\\ application\\ configured",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Starlette application instance is not created or not passed to the ASGI server.",
  "root_cause_type": "generic",
  "root_cause_zh": "未创建Starlette应用程序实例或未将其传递给ASGI服务器。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Trying to run the server without defining the app variable.",
      "why_fails": "The server expects an ASGI application object; without it, it fails.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Using a wrong file name in the server command.",
      "why_fails": "The server cannot find the app if the module path is incorrect.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Define a Starlette app instance and pass it to uvicorn.",
      "success_rate": 0.9,
      "how": "from starlette.applications import Starlette\napp = Starlette()\n# Then run: uvicorn main:app",
      "condition": "",
      "sources": []
    },
    {
      "action": "Ensure the server command references the correct module and app variable.",
      "success_rate": 0.85,
      "how": "uvicorn mymodule:app --reload",
      "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-05",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}