Skip to main content

RemoteExecutionError

from lium.sdk import RemoteExecutionError

Defined in lium.sdk.exceptions.

A function offloaded with @lium.machine did not return a result from the pod, or a command streamed with Lium.stream_exec(check=True) exited non-zero.

When the function raised, the caller sees the original exception type and this error is its __cause__; remote_traceback is the traceback from the pod.

RemoteExecutionError(
message: str,
*,
exception_type: str | None = None,
remote_traceback: str = '',
exit_code: int | None = None,
stdout: str = '',
stderr: str = ''
)

Catching it​

RemoteExecutionError subclasses LiumError → Exception, so a handler for any of those also catches it.

from lium.sdk import RemoteExecutionError

try:
... # any SDK call
except RemoteExecutionError as e:
print(e)

Attributes​

NameTypeDescription
exception_type
remote_traceback
exit_code
stdout
stderr