Exceptions & missing Python modules

exception crappy._global.CameraPrepareError[source]

Error raised by a Camera when one of its children processes crashes while preparing.

exception crappy._global.CameraRuntimeError[source]

Error raised by a Camera when one of its children processes crashes while running.

exception crappy._global.CrappyFail[source]

Exception raised when an unexpected Exception is caught in Crappy. Also raised when all the Blocks do not terminate gracefully.

exception crappy._global.DefinitionError(msg: str)[source]

Exception raised when trying to define an object with the same name as an already-defined one.

exception crappy._global.GeneratorStop[source]

Exception raised when a Generator Block reaches the end of its Path.

exception crappy._global.LinkDataError[source]

Exception raised when trying to send a wrong data type through a Link.

exception crappy.tool.image_processing.video_extenso.LostSpotError[source]

Exception raised when a spot is lost, or when there’s too much overlapping.

exception crappy._global.PrepareError[source]

Error raised in a Block when waiting for all Blocks to be ready but another Block fails to prepare.

exception crappy._global.ReaderStop[source]

Exception raised when a FileReader Camera has exhausted all the images to read.

exception crappy._global.StartTimeout[source]

Exception raised when the start event takes too long to be set.

exception crappy._global.T0NotSetError[source]

Exception raised when requesting the t0 value when it is not set.

class crappy._global.OptionalModule(module_name: str, message: str | None = None, lazy_import: bool = False)[source]

Placeholder for optional dependencies that are not installed.

Will display a message and raise an error when trying to use them.

__init__(module_name: str, message: str | None = None, lazy_import: bool = False) None[source]

Sets the arguments.

Parameters:
  • module_name – The name of the module s a str, preferably the one invoked with pip install.

  • message – Optionally, the message to display in case the module is missing (as a str). If not provided, a generic message will be displayed.

  • lazy_import – If True, the module won’t be imported directly even if it is installed. In stead, it will be imported only when necessary. Allows reducing the import time, especially on Window.

__getattr__(attr: str) Any[source]

Method normally raising an exception indicating that the module is missing.

In case the lazy_import argument was set to True, still tries to get the desired attribute and raises the exception only if the module is missing.

__call__(*_, **__) NoReturn[source]

Method raising an exception indicating that the module is missing.