classification
Title: Truncated error message of original function while multiprocessing or multithreading
Type: Stage:
Components: Library (Lib) Versions: Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: mrshanth
Priority: normal Keywords:

Created on 2021-06-10 12:27 by mrshanth, last changed 2021-06-10 12:27 by mrshanth.

Messages (1)
msg395529 - (view) Author: Prasanth Rajendran (mrshanth) Date: 2021-06-10 12:27
Under multiprocessing package, in pool.py, when an error occurs on line 122:
result = (True, func(*args, **kwds))

The exception "e" has the error message due to execution of the function that is executed in parallel. 

However, the error message is lost when another error is occurred due to the execution of following line 128:
put((job, i, result))

The MaybeEncodingError masks or truncates the original error message, due to the following line at 130:
MaybeEncodingError(e, result[1])

where the repr function in the class truncates the message. 

The final error message has pickling error and the masked error of the actual execution.
History
Date User Action Args
2021-06-10 12:27:15mrshanthcreate