`RuntimeWarning: coroutine 'fetch' was never awaited` and nothing happens.
BeginnerTroubleshootingConcurrency, async, tests, services & containers
Answer
Likely causes → You called an async def function without await (or without scheduling it), so only a coroutine object was created.
Diagnose → Find the call site named in the warning; run with PYTHONASYNCIODEBUG=1 to get the creation traceback.
Fix → result = await fetch(url), or asyncio.create_task(fetch(url)) and keep a reference to the task.
Prevent → mypy and ruff (RUF006 for dangling tasks) catch many of these; type-check async code.
More on Concurrency, async, tests, services & containers
`RuntimeError: asyncio.run() cannot be called from a running event loop` in a Jupyter notebook or inside an async framework.IntermediateAn asyncio health-checker is no faster than a sequential loop.Advanced`Task was destroyed but it is pending!` at shutdown.Advanced`OSError: [Errno 24] Too many open files` from an asyncio scanner with 20,000 targets.IntermediateA `ThreadPoolExecutor` job finishes "successfully" but half the work is missing, with no errors logged.IntermediateIntermittent `KeyError: 'credential_provider'` or `KeyError: 'endpoint_resolver'` when creating boto3 clients from many threads.Advanced