Skip to content

[Core] Please provide better message where 'RuntimeError: Failed to unpickle serialized exception' #49885

@Joshuaalbert

Description

@Joshuaalbert

What happened + What you expected to happen

You could at least tell us what line it's occuring on, and also likely where the origin of the exception is.

(DataStreamer pid=974272) Failed to unpickle serialized exception
(DataStreamer pid=974272) Traceback (most recent call last):
(DataStreamer pid=974272)   File "/usr/local/lib/python3.11/site-packages/ray/exceptions.py", line 51, in from_ray_exception
(DataStreamer pid=974272)     return pickle.loads(ray_exception.serialized_exception)
(DataStreamer pid=974272)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(DataStreamer pid=974272)   File "/usr/local/lib/python3.11/site-packages/jax/_src/errors.py", line 314, in __init__
(DataStreamer pid=974272)     f"{tracer._error_repr()}{tracer._origin_msg()}")
(DataStreamer pid=974272)        ^^^^^^^^^^^^^^^^^^
(DataStreamer pid=974272) AttributeError: 'str' object has no attribute '_error_repr'
(DataStreamer pid=974272) 
(DataStreamer pid=974272) The above exception was the direct cause of the following exception:
(DataStreamer pid=974272) 
(DataStreamer pid=974272) Traceback (most recent call last):
(DataStreamer pid=974272)   File "/usr/local/lib/python3.11/site-packages/ray/_private/serialization.py", line 460, in deserialize_objects
(DataStreamer pid=974272)     obj = self._deserialize_object(data, metadata, object_ref)
(DataStreamer pid=974272)           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(DataStreamer pid=974272)   File "/usr/local/lib/python3.11/site-packages/ray/_private/serialization.py", line 342, in _deserialize_object
(DataStreamer pid=974272)     return RayError.from_bytes(obj)
(DataStreamer pid=974272)            ^^^^^^^^^^^^^^^^^^^^^^^^
(DataStreamer pid=974272)   File "/usr/local/lib/python3.11/site-packages/ray/exceptions.py", line 45, in from_bytes
(DataStreamer pid=974272)     return RayError.from_ray_exception(ray_exception)
(DataStreamer pid=974272)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(DataStreamer pid=974272)   File "/usr/local/lib/python3.11/site-packages/ray/exceptions.py", line 54, in from_ray_exception
(DataStreamer pid=974272)     raise RuntimeError(msg) from e
(DataStreamer pid=974272) RuntimeError: Failed to unpickle serialized exception

Versions / Dependencies

2.39

Reproduction script

Not possible because the poor exception messages makes it hard to find out where the problem is.

Issue Severity

High: It blocks me from completing my task.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Issue that should be fixed within a few weeksbugSomething that is supposed to be working; but isn'tcommunity-backlogcoreIssues that should be addressed in Ray Coreusability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions