ecutest.exceptions

exception ecutest.exceptions.AuthenticationError

Bases: EcuTestCodeError

Raised when ecu.test could not verify the client.

exception ecutest.exceptions.EcuTestCodeError

Bases: Exception

Base class for all exceptions of this Python library.

exception ecutest.exceptions.EventNotSubscribedError(event: str)

Bases: EcuTestCodeError

Raised when a ecutest.webapi.WebApiClient method requires a notification event, but the corresponding event type has not been subscribed.

Fix: provide the required event(s) via the WebApiClient(subscribe_evts=…) constructor (or use ‘all’, the default). See ecutest.webapi.Events for available event names.

exception ecutest.exceptions.IncompatibleVersionError(ecu_test_version: str, ecu_test_code_version)

Bases: EcuTestCodeError

Raised when versions of ecu.test and ecu.test code are not compatible.

exception ecutest.exceptions.NotRegisteredError

Bases: EcuTestCodeError

Raised when attempting to call a job or access a variable that was not registered through ecutest.toolaccess.ToolAccess. Use ecutest.toolaccess.ToolAccess.job(), ecutest.toolaccess.ToolAccess.bus_signal(), ecutest.toolaccess.ToolAccess.model_var(), ecutest.toolaccess.ToolAccess.meas_var(), or ecutest.toolaccess.ToolAccess.calib_var() to create registered instances.

exception ecutest.exceptions.PendingRequestError

Bases: EcuTestCodeError

Raised when another request is still in flight and a new request is issued.

Only a single in-flight request is supported. Wait for the current operation to finish and then retry, serialize calls, or use a second client instance for parallel requests (Note: running multiple ToolAccess sessions concurrently is not supported at the moment).

exception ecutest.exceptions.RemoteError

Bases: EcuTestCodeError

Raised when ecu.test raised an exception while handling a request of ecu.test code. This Exception contains the remote ecu.test traceback.

exception ecutest.exceptions.SocketNotReadyError

Bases: EcuTestCodeError

Raised when the client attempts to send before the connection to ecu.test is established.

exception ecutest.exceptions.StateError

Bases: EcuTestCodeError

Raised when a method requires a specific ToolAccess or WebApiClient state that is not satisfied e.g., registering a bus signal before ecutest.toolaccess.ToolAccess.init() was called.