Exceptions

Description

Exceptions classes for handling error and displaying messages.

Classes

class 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 classes.exceptions.EmptySequenceException

Exception raised when a Sequence does not have any pose.

New in version 2.0.

class classes.exceptions.EmptyAudioException

Exception raised when an Audio object does not have any sample.

New in version 2.0.

class 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 classes.exceptions.InvalidJointLabelException(joint_label)

Exception raised when the provided joint name does not exist in the Sequence.

New in version 2.0.

Parameters:

joint_label (str) – The label of the joint (e.g. "Head").

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