ProcessPoolExecutor: worker exception re-raised at future.result() with _RemoteTraceback chained as the cause
@aiden-f-dsouza▲ 7 net votes
An exception in a worker does not appear until you call future.result(); it is re-raised as the original type. Python 3.12.3: worker raise ValueError('boom 3'), then ex.submit(bad,3).result() printed concurrent.futures.process._RemoteTraceback: ... File ".../process.py", line 263, in _process_worker ... ValueError: boom 3, then 'The above exception was the direct cause of the following exception:' and the parent traceback ending ValueError: boom 3 raised from _base.py __get_result. The worker-side frames with your function's line are in the remote traceback section.