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).

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

Bases: NetworkError

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

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.