Exceptions

exception labelbox.exceptions.ApiLimitError(message, cause=None)[source]

Bases: LabelboxError

Raised when the user performs too many requests in a short period of time.

exception labelbox.exceptions.AuthenticationError(message, cause=None)[source]

Bases: LabelboxError

Raised when an API key fails authentication.

exception labelbox.exceptions.AuthorizationError(message, cause=None)[source]

Bases: LabelboxError

Raised when a user is unauthorized to perform the given request.

exception labelbox.exceptions.ConfidenceNotSupportedException[source]

Bases: Exception

Raised when confidence is specified for unsupported annotation type

exception labelbox.exceptions.CustomMetricsNotSupportedException[source]

Bases: Exception

Raised when custom_metrics is specified for unsupported annotation type

exception labelbox.exceptions.InconsistentOntologyException[source]

Bases: Exception

exception labelbox.exceptions.InternalServerError(message, cause=None)[source]

Bases: LabelboxError

Nondescript prisma or 502 related errors.

Meant to be retryable.

TODO: these errors need better messages from platform

exception labelbox.exceptions.InvalidAttributeError(db_object_type, field)[source]

Bases: LabelboxError

Raised when a field (name or Field instance) is not valid or found for a specific DB object type.

exception labelbox.exceptions.InvalidQueryError(message, cause=None)[source]

Bases: LabelboxError

Indicates a malconstructed or unsupported query (either by GraphQL in general or by Labelbox specifically). This can be the result of either client or server side query validation.

exception labelbox.exceptions.LabelboxError(message, cause=None)[source]

Bases: Exception

Base class for exceptions.

exception labelbox.exceptions.MALValidationError(message, cause=None)[source]

Bases: LabelboxError

Raised when user input is invalid for MAL imports.

exception labelbox.exceptions.MalformedQueryException[source]

Bases: Exception

Raised when the user submits a malformed query.

exception labelbox.exceptions.NetworkError(cause)[source]

Bases: LabelboxError

Raised when an HTTPError occurs.

exception labelbox.exceptions.OperationNotAllowedException[source]

Bases: Exception

Raised when user does not have permissions to a resource or has exceeded usage limit

exception labelbox.exceptions.ProcessingWaitTimeout[source]

Bases: Exception

Raised when waiting for the data rows to be processed takes longer than allowed

exception labelbox.exceptions.ResourceConflict(message, cause=None)[source]

Bases: LabelboxError

Exception raised when a given resource conflicts with another.

exception labelbox.exceptions.ResourceCreationError(message, cause=None)[source]

Bases: LabelboxError

Indicates that a resource could not be created in the server side due to a validation or transaction error

exception labelbox.exceptions.ResourceNotFoundError(db_object_type, params)[source]

Bases: LabelboxError

Exception raised when a given resource is not found.

exception labelbox.exceptions.TimeoutError(message, cause=None)[source]

Bases: LabelboxError

Raised when a request times-out.

exception labelbox.exceptions.UuidError(message, cause=None)[source]

Bases: LabelboxError

Raised when there are repeat Uuid’s in bulk import request.

exception labelbox.exceptions.ValidationFailedError(message, cause=None)[source]

Bases: LabelboxError

Exception raised for when a GraphQL query fails validation (query cost, etc.) E.g. a query that is too expensive, or depth is too deep.