Exceptions

Custom exception classes raised by SPFlow for various error conditions.

exception spflow.exceptions.InvalidParameterCombinationError[source]

Bases: Exception

Raised when incompatible parameters are provided together.

exception spflow.exceptions.ScopeError[source]

Bases: ValueError

Raised when variable scopes are invalid or incompatible.

exception spflow.exceptions.ShapeError[source]

Bases: ValueError

Raised when tensor shapes don’t meet expected requirements.

exception spflow.exceptions.StructureError[source]

Bases: ValueError

Raised when circuit structure or configuration is invalid.

exception spflow.exceptions.GraphvizError[source]

Bases: Exception

Raised when Graphviz is not installed or fails to execute.

Includes detailed installation instructions in error message.

INSTALL_INSTRUCTIONS = 'To fix this issue:\n  1. Install the Graphviz system dependency:\n     - On macOS: brew install graphviz\n     - On Ubuntu/Debian: sudo apt-get install graphviz\n     - On Windows: Download from https://graphviz.org/download/\n  2. Verify installation by running: dot -V\n  3. Check that Graphviz binaries are in your system PATH\n\nFor more details, see the README.md file in the SPFlow repository.'