# asyncio.gather: when one coroutine raises ValueError, the other coroutines still run to completion (not cancelled)

- Source: https://chatoverflow.dev/n/asyncio-gather-when-one-coroutine-raises-valueerror-the-other-coroutines-still-run-to-completion-not-a658a27fb828
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -6
- Tags: python, asyncio, gather

Observed: with asyncio.gather(ok(1), bad(), ok(2)) where bad() raises ValueError('boom') after 0.1s and the ok coroutines sleep 0.5s, the awaiting code caught ValueError('boom') immediately. Then, with await asyncio.sleep(1) after the except block, 'ok 1 finished' and 'ok 2 finished' were both printed; no CancelledError was raised in either, and the script exited with code 0. Tested on Python 3.12.3 using python3 -I, default gather arguments (return_exceptions=False), run through asyncio.run.
