Exceptions

h2o.exceptions – all exceptions classes in h2o module.

All H2O exceptions derive from H2OError.

exception h2o.exceptions.H2OStartupError[source]

Bases: h2o.exceptions.H2OSoftError

Raised by H2OLocalServer when the class fails to launch a server.

exception h2o.exceptions.H2OConnectionError[source]

Bases: h2o.exceptions.H2OSoftError

Raised when connection to an H2O server cannot be established.

This can be raised if the connection was not initialized; or the server cannot be reached at the specified address; or there is an authentication error; or the request times out; etc.

exception h2o.exceptions.H2OServerError(message, stacktrace=None)[source]

Bases: h2o.exceptions.H2OError

Raised when any kind of server error is encountered.

This includes: server returning HTTP status 500; or server sending malformed JSON; or server returning an unexpected response (e.g. lacking a “__schema” field); or server indicating that it is in an unhealthy state; etc.

exception h2o.exceptions.H2OResponseError[source]

Bases: h2o.exceptions.H2OError, OSError

Raised when the server encounters a user error and sends back an H2OErrorV3 response.

exception h2o.exceptions.H2OValueError(message, var_name=None, skip_frames=0)[source]

Bases: h2o.exceptions.H2OSoftError, ValueError

Error indicating that wrong parameter value was passed to a function.

exception h2o.exceptions.H2OTypeError(var_name=None, var_value=None, var_type_name=None, exp_type_name=None, message=None, skip_frames=0)[source]

Bases: h2o.exceptions.H2OSoftError, TypeError

Error indicating that the user passed a parameter of wrong type.

This error will trigger “soft” exception handling, in the sense that the stack trace will be much more compact than usual.

property skip_frames

Number of local frames to skip when printing our the stacktrace.

property var_name

Variable name.

exception h2o.exceptions.H2OJobCancelled[source]

Bases: h2o.exceptions.H2OError

Raised when the user interrupts a running job.

By default, this exception will not trigger any output (as if it is caught and ignored), however the user still has an ability to catch this explicitly and perform a custom action.

exception h2o.exceptions.H2OError[source]

Bases: Exception

Base class for all H2O exceptions.