{
  "id": "python/asyncio-run-coroutine-twice",
  "signature": "RuntimeError: cannot reuse already awaited coroutine",
  "signature_zh": "运行时错误：无法重用已被等待的协程",
  "regex": "RuntimeError:\\ cannot\\ reuse\\ already\\ awaited\\ coroutine",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Attempting to await the same coroutine object more than once, which is not allowed in asyncio.",
  "root_cause_type": "generic",
  "root_cause_zh": "尝试多次等待同一个协程对象，这在asyncio中是不允许的。",
  "versions": [
    {
      "version": "3.7",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The coroutine is already exhausted; you must create a new coroutine.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Coroutines are not meant to be manually driven; it's complex and error-prone.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 1.0,
      "how": "async def my_coro(): pass; await my_coro(); await my_coro()",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.95,
      "how": "task = asyncio.create_task(my_coro()); await task; task2 = asyncio.create_task(my_coro()); await task2",
      "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.9,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-12-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}