virtual_knitting_machine.knitting_machine_warnings.carrier_operation_warnings module

A module containing warnings related to yarn carrier operations and hook management. This module provides warning classes for carrier operation mismatches and hook state inconsistencies during yarn insertion and release operations on knitting machines.

exception Mismatched_Releasehook_Warning(carrier_id)[source]

Bases: Yarn_Carrier_Warning

A warning for release hook operations that do not match the currently hooked carrier. This warning occurs when a release hook operation is requested for a carrier that is not currently connected to the insertion hook, and the system releases the actually hooked yarn instead.

Parameters:

carrier_id (int | Yarn_Carrier)

__init__(carrier_id)[source]

Initialize a mismatched release hook warning.

Parameters:

carrier_id (int | Yarn_Carrier) – The carrier ID that was incorrectly requested for release hook operation.

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

carrier_id: Yarn_Carrier | int