See also

Please visit our docs for more information on Segments.ai and visit the setup page to learn how to install and setup the Segments.ai Python SDK.

Exceptions

exception SegmentsError(message, cause=None)[source]

Bases: Exception

Base class for exceptions.

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

Bases: SegmentsError

Raised when an API key fails authentication.

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

Bases: SegmentsError

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

exception NetworkError(message, cause=None)[source]

Bases: SegmentsError

Raised when an HTTP error occurs.

exception NotFoundError(message, cause=None)[source]

Bases: NetworkError

Raised when the requested object is not found (e.g., because the name is misspelled, the page index is incorrect, …).

exception AlreadyExistsError(message, cause=None)[source]

Bases: NetworkError

Raised when the object (e.g., dataset, labelset, release, …) already exists.

exception CollaboratorError(message, cause=None)[source]

Bases: NetworkError

Raised when a collaborator error occurs (e.g., a collaborator already has a role / cannot be added to an organization / …).

exception SubscriptionError(message, cause=None)[source]

Bases: NetworkError

Raised when a subscription error occurs (e.g., your trial ends, you exceed your user limit for private datasets, …).

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

Bases: SegmentsError

Raised when a request times out.

exception APILimitError(message, cause=None)[source]

Bases: SegmentsError

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

exception ValidationError(message, cause=None)[source]

Bases: SegmentsError

Raised when validation of the response fails.

exception InvalidModelError(message, cause=None)[source]

Bases: SegmentsError

Raised when the model is invalid for the dataset type.

exception MissingContextError(message, cause=None)[source]

Bases: SegmentsError

Raised when the SDK is missing context information about a resource.