Exceptions

Public exception hierarchy for pyStrich.

Added in version 0.11: Unified exception hierarchy. All pyStrich-raised errors now inherit from PyStrichError; all pyStrich-emitted warnings inherit from PyStrichWarning.

exception PyStrichError[source]

Bases: Exception

Base class for all pyStrich-specific errors.

Added in version 0.11.

exception PyStrichInvalidInput[source]

Bases: PyStrichError

The text being encoded is not valid for the chosen barcode format.

Typically raised in response to end-user-supplied input.

Added in version 0.11.

exception PyStrichInvalidOption[source]

Bases: PyStrichError

An encoder option (configuration argument) is invalid.

Typically a programmer error: options are usually hardcoded by the caller rather than passed through from end-user input.

Added in version 0.11.

exception PyStrichWarning[source]

Bases: UserWarning

Base class for pyStrich-specific warnings.

Added in version 0.11.

exception Fnc1WorkaroundCompatWarning[source]

Bases: PyStrichWarning

The legacy chr(231) FNC1 trick triggered the compat shim; use the FNC1 constant instead.

Added in version 0.11.

exception DataMatrixNonAsciiWarning[source]

Bases: PyStrichWarning

DataMatrix input contains non-ASCII characters; output will not decode correctly.

Added in version 0.11.