Fix exception serialisation error
This commit is contained in:
parent
f1a1de5469
commit
8cd3449cff
3 changed files with 11 additions and 5 deletions
|
|
@ -57,7 +57,9 @@ def mapper_function(
|
|||
last_chunk.append(MapResult(i, func(value)))
|
||||
except Exception as e:
|
||||
last_chunk.append(
|
||||
MapResult(i, None, e, traceback.format_exc())
|
||||
# `e` has to be stringified in order to avoid any
|
||||
# surprising serialization error when returning it
|
||||
MapResult(i, None, str(e), traceback.format_exc())
|
||||
)
|
||||
except queue.Empty:
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue