phenotypic.tools.exceptions_#
PhenoTypic Exceptions
This module contains all exceptions used throughout the PhenoTypic library. Exceptions are organized by module and functionality.
Exceptions
Exception raised when the shape of the other_image doesn't match the key's section. |
|
|
Exception raised when data integrity is compromised. |
Exception raised when no image data is loaded. |
|
Exception raised when a non-GriddedImage object is provided as arr. |
|
|
Exception raised when trying to directly assign a new object to a protected attribute. |
|
Exception raised when trying to change rgb/gray elements directly. |
Base exception for image operation errors. |
|
Base exception for immutable component errors. |
|
|
Exception raised when arr shape doesn't match the image gray. |
Exception raised when an |
|
|
Exception raised when trying to convert to HSV from a non-RGB imformat. |
|
Exception raised when trying to set object map with invalid other_image type. |
Exception raised when trying to set mask with invalid scalar other_image. |
|
|
Exception raised when trying to set mask with invalid other_image type. |
|
Exception raised when a shape mismatch occurs. |
Exception raised when metadata key contains spaces. |
|
|
Exception raised when metadata key is not a string. |
|
Exception raised when metadata other_image is not scalar. |
Exception raised when no array is found. |
|
|
Exception raised when a required object is missing. |
Exception raised when no image data is loaded. |
|
|
Exception raised when no objects are found in an image. |
Exception raised when no output was returned in an operation. |
|
|
Exception raised when an object with a specified label is not found. |
|
Exception raised when an operation fails. |
|
Exception raised when an operation attempts to change a component it shouldn't. |
|
Exception raised when output is not of the expected type. |
Base exception class for all PhenoTypic errors. |
|
Exception raised when trying to change the UUID metadata. |
|
|
Exception raised when an unknown error occurs. |
|
Exception raised when trying to read an unsupported file type. |
|
Represents an error when an unsupported imformat format is detected. |
Exception raised when trying to change the UUID of an image. |
- exception phenotypic.tools.exceptions_.ArrayKeyValueShapeMismatchError[source]#
Bases:
ValueErrorException raised when the shape of the other_image doesn’t match the key’s section.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- exception phenotypic.tools.exceptions_.DataIntegrityError(component, operation, image_name=None)[source]#
Bases:
AttributeErrorException raised when data integrity is compromised.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- name#
attribute name
- obj#
object
- exception phenotypic.tools.exceptions_.EmptyImageError[source]#
Bases:
AttributeErrorException raised when no image data is loaded.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- name#
attribute name
- obj#
object
- exception phenotypic.tools.exceptions_.GridImageInputError[source]#
Bases:
ValueErrorException raised when a non-GriddedImage object is provided as arr.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- exception phenotypic.tools.exceptions_.IllegalAssignmentError(attr)[source]#
Bases:
ValueErrorException raised when trying to directly assign a new object to a protected attribute.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- exception phenotypic.tools.exceptions_.IllegalElementAssignmentError(component_name)[source]#
Bases:
ImmutableComponentErrorException raised when trying to change rgb/gray elements directly.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- name#
attribute name
- obj#
object
- exception phenotypic.tools.exceptions_.ImageOperationError[source]#
Bases:
PhenoTypicErrorBase exception for image operation errors.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- exception phenotypic.tools.exceptions_.ImmutableComponentError[source]#
Bases:
AttributeErrorBase exception for immutable component errors.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- name#
attribute name
- obj#
object
- exception phenotypic.tools.exceptions_.InputShapeMismatchError(param_name)[source]#
Bases:
ValueErrorException raised when arr shape doesn’t match the image gray.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- exception phenotypic.tools.exceptions_.InterfaceError[source]#
Bases:
NotImplementedError,PhenoTypicErrorException raised when an
abc_method is called when it’s not supposed to be.- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- exception phenotypic.tools.exceptions_.InvalidHsvSchemaError(imformat)[source]#
Bases:
AttributeErrorException raised when trying to convert to HSV from a non-RGB imformat.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- name#
attribute name
- obj#
object
- exception phenotypic.tools.exceptions_.InvalidMapValueError(value_type)[source]#
Bases:
ValueErrorException raised when trying to set object map with invalid other_image type.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- exception phenotypic.tools.exceptions_.InvalidMaskScalarValueError[source]#
Bases:
ValueErrorException raised when trying to set mask with invalid scalar other_image.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- exception phenotypic.tools.exceptions_.InvalidMaskValueError(value_type)[source]#
Bases:
ValueErrorException raised when trying to set mask with invalid other_image type.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- exception phenotypic.tools.exceptions_.InvalidShapeError(component)[source]#
Bases:
ValueErrorException raised when a shape mismatch occurs.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- exception phenotypic.tools.exceptions_.MetadataKeySpacesError[source]#
Bases:
TypeErrorException raised when metadata key contains spaces.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- exception phenotypic.tools.exceptions_.MetadataKeyValueError(type_received)[source]#
Bases:
ValueErrorException raised when metadata key is not a string.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- exception phenotypic.tools.exceptions_.MetadataValueNonScalarError(type_value)[source]#
Bases:
TypeErrorException raised when metadata other_image is not scalar.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- exception phenotypic.tools.exceptions_.NoArrayError[source]#
Bases:
AttributeErrorException raised when no array is found.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- name#
attribute name
- obj#
object
- exception phenotypic.tools.exceptions_.NoComponentError(component)[source]#
Bases:
AttributeErrorException raised when a required object is missing.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- name#
attribute name
- obj#
object
- exception phenotypic.tools.exceptions_.NoImageDataError[source]#
Bases:
AttributeErrorException raised when no image data is loaded.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- name#
attribute name
- obj#
object
- exception phenotypic.tools.exceptions_.NoObjectsError(image_name=None)[source]#
Bases:
AttributeErrorException raised when no objects are found in an image.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- name#
attribute name
- obj#
object
- exception phenotypic.tools.exceptions_.NoOutputError[source]#
Bases:
PhenoTypicErrorException raised when no output was returned in an operation.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- exception phenotypic.tools.exceptions_.ObjectNotFoundError(label)[source]#
Bases:
AttributeErrorException raised when an object with a specified label is not found.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- name#
attribute name
- obj#
object
- exception phenotypic.tools.exceptions_.OperationFailedError(operation, image_name, err_type, message)[source]#
Bases:
ImageOperationErrorException raised when an operation fails.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- exception phenotypic.tools.exceptions_.OperationIntegrityError(opname: str, component: str, image_name=None)[source]#
Bases:
AttributeErrorException raised when an operation attempts to change a component it shouldn’t.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- name#
attribute name
- obj#
object
- exception phenotypic.tools.exceptions_.OutputValueError(expected_type)[source]#
Bases:
PhenoTypicErrorException raised when output is not of the expected type.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- exception phenotypic.tools.exceptions_.PhenoTypicError[source]#
Bases:
ExceptionBase exception class for all PhenoTypic errors.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- exception phenotypic.tools.exceptions_.UUIDReassignmentError[source]#
Bases:
AttributeErrorException raised when trying to change the UUID metadata.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- name#
attribute name
- obj#
object
- exception phenotypic.tools.exceptions_.UnknownError(message='An unknown error occurred.')[source]#
Bases:
PhenoTypicErrorException raised when an unknown error occurs.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- exception phenotypic.tools.exceptions_.UnsupportedFileTypeError(suffix)[source]#
Bases:
ValueErrorException raised when trying to read an unsupported file type.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- exception phenotypic.tools.exceptions_.UnsupportedImageFormat(imformat)[source]#
Bases:
ValueErrorRepresents an error when an unsupported imformat format is detected.
This error is raised when a specified imformat format is not supported by the application or library that utilizes this exception class.
- Parameters:
schema (str) – The imformat format that triggered this exception.
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#