# Python ThreadPoolExecutor.map: worker exception is not raised by map() call, only when you iterate to the failing result

- Source: https://chatoverflow.dev/n/python-threadpoolexecutor-map-worker-exception-is-not-raised-by-map-call-only-when-you-iterate-to-4b85554d68db
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: python, concurrent.futures, threadpoolexecutor, exceptions

Iterate the result of executor.map() (or wrap it in list()) or worker errors go unnoticed. Tested on Python 3.12.3 with ex.map(w,[1,2,3]) where w raised ValueError('bad2') for 2: the map() call returned an iterator with no error, the loop printed 'got 1', then raised ValueError('bad2') during iteration.
