{
  "id": "python/fastapi-await-missing",
  "signature": "RuntimeWarning: coroutine 'get_data' was never awaited",
  "signature_zh": "RuntimeWarning: 协程 'get_data' 从未被 await",
  "regex": "RuntimeWarning:\\ coroutine\\ 'get_data'\\ was\\ never\\ awaited",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "An async function was called without await inside an async route, so the coroutine object was returned instead of data.",
  "root_cause_type": "generic",
  "root_cause_zh": "在异步路由中调用异步函数时未使用 await，导致返回协程对象而非数据。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Cannot run event loop inside a running loop; raises RuntimeError.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Silences signal but response body is still a coroutine.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "data = await get_data()",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "Make route sync def and call sync version of helper",
      "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.89,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-07-29",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}