Fix exception serialisation error

This commit is contained in:
Andras Schmelczer 2022-07-16 12:27:05 +02:00
parent f1a1de5469
commit 8cd3449cff
No known key found for this signature in database
GPG key ID: 0EA1BC97D0AB076E
3 changed files with 11 additions and 5 deletions

View file

@ -40,7 +40,9 @@ def manage_communication(
except Exception as e:
if ignore_exceptions:
logger.error(
f"Exception {e} encountered in input, traceback:\n{traceback.format_exc()}"
f"""Exception {e} encountered in input, traceback:\n{
traceback.format_exc()
}"""
)
else:
raise
@ -51,10 +53,12 @@ def manage_communication(
if r.exception is not None:
if ignore_exceptions:
logger.error(
f"Exception {r.exception} encountered in worker, traceback:\n{r.worker_traceback}"
f"""Exception {
r.exception
} encountered in worker, traceback:\n{r.worker_traceback}"""
)
else:
raise WorkerException from r.exception
raise WorkerException(r.exception)
if unordered: