Exceptions
Description
Exceptions classes for handling error and displaying messages.
Classes
- class krajjat.classes.exceptions.InvalidPathException(path, object_type, reason)
Exception raised when a path provided does not point towards a valid Sequence or Audio. This error can be raised:
When multiple file extensions compatible with the toolbox are detected in the same folder.
When files are named sequentially (e.g.
pose_1.txt,pose_2.txt, etc.), and at least one file of the sequence is missing.When a provided file has an incompatible extension.
When the folder or file does not exist.
New in version 2.0.
- Parameters:
path (str) – The path to a file or folder.
object_type (str) – The type of the element the path is supposed to point towards (
"sequence"or"audio clip").reason (str) – A short description of the reason the path is invalid.
- class krajjat.classes.exceptions.InvalidParameterValueException(name, given_value, expected_values=None)
Exception raised when the value of a parameter is not one of the expected ones.
New in version 2.0.
- Parameters:
name (str) – The name of the parameter set at an invalid value.
given_value – The invalid value given to the parameter.
expected_values (list, optional) – The expected value or values the parameter should have.
- class krajjat.classes.exceptions.EmptyInstanceException(kind)
Exception raised when the instance of a Sequence, Audio or AudioDerivative does not have any pose.
New in version 2.0.
- class krajjat.classes.exceptions.ImpossibleTimeTravelException(index1, index2, timestamp1, timestamp2, number_of_timestamps, object_type)
Exception raised if two consecutive timestamps are not in chronological order.
New in version 2.0.
- Parameters:
index1 (int) – The index of a first pose or sample.
index2 (int) – The index of a second pose or sample, higher than the first.
timestamp1 (float) – The timestamp of the first pose or sample.
timestamp2 (float) – The timestamp of the second pose or sample.
number_of_timestamps (int) – The number of timestamps in the original object.
object_type (str) – The type of the element the path is supposed to point towards (
"sequence"or"audio clip").
- class krajjat.classes.exceptions.InvalidJointLabelException(joint_label)
Exception raised when the provided joint name does not exist in the Sequence or the Pose.
New in version 2.0.
- Parameters:
joint_label (str) – The label of the joint (e.g.
"Head").
- class krajjat.classes.exceptions.ModuleNotFoundException(module_name, attempted_task)
Exception raised when a specific Python module has not been found installed in the execution environment.
New in version 2.0.
- Parameters:
module_name (str) – The name of the Python module that failed to load.
attempted_task (str) – A short description of the reason the module was necessary.
- class krajjat.classes.exceptions.InvalidPoseIndexException(pose_index, number_of_poses)
Exception raised when a pose index provided does not exist in the Sequence instance.
New in version 2.0.
- Parameters:
pose_index (int) – The invalid index of the pose that was provided.
number_of_poses (int) – The number of poses in the Sequence instance.
- class krajjat.classes.exceptions.JointLabelAlreadyExistsException(joint_label)
Exception raised when tying to add a joint with a label that already exists in a Pose object.
New in version 2.0.
- Parameters:
joint_label (str) – The joint label that already exists in the Pose object.
- class krajjat.classes.exceptions.PoseAlreadyExistsException(sequence_name, timestamp)
Exception raised when tying to add a pose with a timestamp that already exists in a Sequence object.
New in version 2.0.
- Parameters:
sequence_name (str) – The name of the target Sequence object.
timestamp (float) – The timestamp of the pose that already exists in the Sequence object.
- class krajjat.classes.exceptions.NotASubPathException(path1, path2)
Exception raised when a path is not a parent of another.
New in version 2.0.
- Parameters:
path1 (str) – The alleged parent path
path2 (str) – The alleged child path
- class krajjat.classes.exceptions.DifferentSequencesLengthsException(sequence1, sequence2)
Exception raised when two sequences have a different number of poses.
New in version 2.0.
- class krajjat.classes.exceptions.MissingRecordingDateException(sequence)
Exception raised when a Sequence is missing a recording date.
New in version 2.0.
- Parameters:
sequence (Sequence) – A Sequence instance.
- class krajjat.classes.exceptions.NoExistingJointListPresetException(variable_name, system)
Exception raised when no existing joint list preset is found for a certain system.
New in version 2.0.
- Parameters:
variable_name (str) – The name of the variable to calculate.
system (str) – The recording system of the Sequence instance.
- class krajjat.classes.exceptions.VariableSamplingRateException(sequence_name)
Exception raised when performing an operation that does not support a variable sampling rate.
New in version 2.0.
- Parameters:
sequence_name (str) – The name of the sequence.