Skip to content

error

Exceptions raised by StagPy.

StagpyError

Bases: Exception

Base class for exceptions raised by StagPy.

Note

All exceptions derive from this class. To catch any error that might be raised by StagPy due to invalid requests/missing data, you only need to catch this exception.

NoSnapshotError dataclass

Bases: StagpyError

Raised when no snapshot can be found.

NoGeomError dataclass

Bases: StagpyError

Raised when no geometry info can be found.

NoTimeError dataclass

Bases: StagpyError

Raised when no time can be found for a step.

NoRefstateError dataclass

Bases: StagpyError

Raised when no refstate output can be found.

NoParFileError dataclass

Bases: StagpyError

Raised when no par file can be found.

NotAvailableError

Bases: StagpyError

Raised when a feature is not available yet.

ParsingError dataclass

Bases: StagpyError

Raised when a parsing error occurs.

InvalidTimestepError dataclass

Bases: StagpyError

Raised when invalid time step is requested.

InvalidSnapshotError dataclass

Bases: StagpyError

Raised when invalid snapshot is requested.

InvalidTimeFractionError dataclass

Bases: StagpyError

Raised when invalid fraction of series is requested, should be in (0, 1].

InvalidNfieldsError dataclass

Bases: StagpyError

Raised when invalid nfields_max is requested.

InvalidZoomError dataclass

Bases: StagpyError

Raised when invalid zoom is requested, should be in [0, 360].

MissingDataError

Bases: StagpyError

Raised when requested data is not present in output.

UnknownVarError dataclass

Bases: StagpyError

Raised when invalid var is requested.

UnknownFieldVarError dataclass

Bases: UnknownVarError

Raised when invalid field var is requested.

UnknownRprofVarError dataclass

Bases: UnknownVarError

Raised when invalid rprof var is requested.

UnknownTimeVarError dataclass

Bases: UnknownVarError

Raised when invalid time var is requested.