From 3a2eb1467b58cfd91f3ecfcda33959bd573b2ee1 Mon Sep 17 00:00:00 2001 From: Robert Nishihara Date: Sun, 23 Apr 2017 16:12:25 -0700 Subject: [PATCH] Fix failure to propagate error message. (#479) --- python/ray/worker.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/ray/worker.py b/python/ray/worker.py index 8cb114b0a..60593a290 100644 --- a/python/ray/worker.py +++ b/python/ray/worker.py @@ -1871,7 +1871,11 @@ def main_loop(worker=global_worker): traceback_str = format_error_message(traceback.format_exc()) else: # The error occurred before the task execution. - traceback_str = None + if isinstance(e, RayGetError) or isinstance(e, RayGetArgumentError): + # In this case, getting the task arguments failed. + traceback_str = None + else: + traceback_str = traceback.format_exc() failure_object = RayTaskError(function_name, e, traceback_str) failure_objects = [failure_object for _ in range(len(return_object_ids))] store_outputs_in_objstore(return_object_ids, failure_objects, worker)