ray.exceptions.RayActorError#

exception ray.exceptions.RayActorError(cause: RayTaskError | ray.core.generated.common_pb2.ActorDiedErrorContext = None)[source]#

Indicates that the actor died unexpectedly before finishing a task.

This exception could happen either because the actor process dies while executing a task, or because a task is submitted to a dead actor.

If the actor is dead because of an exception thrown in its creation tasks, RayActorError will contain the creation_task_error, which is used to reconstruct the exception on the caller side.

Parameters:

cause – The cause of the actor error. RayTaskError type means the actor has died because of an exception within __init__. ActorDiedErrorContext means the actor has died because of unexepected system error. None means the cause is not known. Theoretically, this should not happen, but it is there as a safety check.