datamint.exceptions

exception datamint.exceptions.AuthenticationError

Bases: DatamintException

Raised when the API key is missing or rejected (HTTP 401).

exception datamint.exceptions.DatamintException

Bases: Exception

Base class for all Datamint exceptions.

exception datamint.exceptions.DefaultProjectNotSetError(hint=None)

Bases: DatamintException

Raised when a method requires a project, none was passed, and no default project has been selected via datamint.select_project() (or the selected default could not be found on this connection).

Parameters:

hint (str | None)

exception datamint.exceptions.EntityAlreadyExistsError(entity_type, params)

Bases: DatamintException

Raised when trying to create an entity that already exists.

Parameters:
  • entity_type (str)

  • params (dict)

exception datamint.exceptions.ItemNotFoundError(item_type, params)

Bases: DatamintException

Raised when a requested item does not exist (HTTP 404).

Parameters:
  • item_type (str)

  • params (dict)

property resource_type
set_params(resource_type, params)
Parameters:
  • resource_type (str)

  • params (dict)

exception datamint.exceptions.JobTimeoutError

Bases: DatamintException, TimeoutError

Raised when a deployment or inference job does not finish within the allowed time.

Subclasses both DatamintException and the built-in TimeoutError so callers catching either one will handle it correctly.

exception datamint.exceptions.ModelNotDeployedError(model_name, model_version=None, model_alias=None)

Bases: DatamintException

Raised when trying to run inference on a model with no deployed image (HTTP 404).

Parameters:
  • model_name (str)

  • model_version (int | None)

  • model_alias (str | None)

exception datamint.exceptions.NetworkError

Bases: DatamintException

Raised on connection failures, SSL errors, or other transport-level problems.

exception datamint.exceptions.PermissionDeniedError

Bases: DatamintException

Raised when the authenticated user lacks permission for the requested operation (HTTP 403).

datamint.exceptions.ResourceNotFoundError

alias of ItemNotFoundError

exception datamint.exceptions.ServerError(message, status_code=None)

Bases: DatamintException

Raised when the server returns an unexpected error (HTTP 5xx).

Parameters:
  • message (str)

  • status_code (int | None)

exception datamint.exceptions.ValidationError

Bases: DatamintException

Raised when the server rejects a request due to invalid input (HTTP 400/422).