Skip to content

pyflightstream.exceptions (stable)

Generated from the docstrings at build time: every one of the 80 names in the __all__ of pyflightstream.exceptions has an entry below. The names a guide or an example uses come first; the others follow under Advanced.

Single public catalog of every pyflightstream exception and warning.

Pipeline role: cross-cutting support module, after the pandas pandas.errors model. Every exception or warning class the package can raise is importable from here under one roof, so user code catches without knowing which pipeline layer raises, and the completeness is test-asserted: a new exception class that does not join this catalog fails the suite. The catalog imports on a base install; only the modules an optional extra gates keep their classes in import-light homes.

Every exception here descends from :class:PyflightstreamError, so one except clause catches every CATALOGUED exception (SRS FR-39), and each also has its declared standard-library base, so except ValueError and except RuntimeError catch the corresponding families. Catalogued is the operative word and the requirement says so in bold: a residual of bare standard-library raises survives outside this catalog. Every site the guard's walk REACHES is named in the ratchet in tests/tier1_offline/test_exceptions_catalog.py, which is the single home of that list; the walk's own reach is stated in that same module (SRS FR-39 states only the one base), and at least one site sits outside it. Until the residual is empty, the standard-library bases are what covers it, and the plural matters: the residual is mostly ValueError and also holds TypeError and RuntimeError sites, so being exhaustive today means catching :class:PyflightstreamError and those bases together.

Every exception descends from :class:PyflightstreamError; every warning descends from :class:PyflightstreamWarning. The catalog presents both roots.

Examples:

>>> from pyflightstream.exceptions import MatrixError
>>> try:
...     raise MatrixError("demo")
... except MatrixError as error:
...     print(error)
demo
>>> from pyflightstream.exceptions import PyflightstreamError
>>> issubclass(MatrixError, PyflightstreamError), issubclass(MatrixError, ValueError)
(True, True)

The classes stay defined in their home modules (the didactic policy wants the refusal next to the physics it explains); this module only re-exports. Structured refusals carry their facts as attributes where the message alone would force parsing: see :class:~pyflightstream.versions.UnknownVersionError (version, known), :class:~pyflightstream.versions.AmbiguousVersionAliasError (alias, candidates) and :class:~pyflightstream.workspace.InputArtifactError (kind, artifact_id, available).

Used in the guides

pyflightstream.exceptions.AmbiguousVersionAliasError

AmbiguousVersionAliasError(
    message: str,
    *,
    alias: str,
    candidates: tuple[str, ...] = (),
)

Bases: PyflightstreamError, ValueError

A vendor release name identifies more than one registered build.

The vendor reuses a release name across builds, and not only across the hotfixes of one release: the 26.1 family is the February and May 2026 releases sharing a name rather than a release and its hotfix. Which builds sit in either family is not written here, because the message this class raises enumerates them from the registry and a second copy in prose has gone stale on every registration. A display alias therefore cannot select a build, and returning either one would hand the caller a silently wrong solver. The refusal names each candidate by its vendor BUILD NUMBER, which is what the solver prints and the only thing a reader holding two installs can match. The registry records the vendor's own name (that name is a fact about the world) and refuses it at resolution time, so the caller sees the choice instead of inheriting it.

Attributes:

Name Type Description
alias str

The vendor release name that matched more than one entry.

candidates tuple of str

Canonical identifiers sharing that name, in release order, so callers can offer the choice without parsing the message.

pyflightstream.exceptions.CommandArgumentError

Bases: PyflightstreamError, ValueError

An emitted argument does not satisfy the database specification.

The message names the command, the argument, the expectation, and the citation of the entry (a manual page or a committed probe report), so the fix can be checked against its source directly.

pyflightstream.exceptions.CommandNotInVersionError

Bases: PyflightstreamError, LookupError

A command is unavailable in the requested FlightStream version.

Raised by a per-version view when the command is removed in that version or has no recorded evidence for it. The message carries the manual citation and the successor command when one is recorded.

pyflightstream.exceptions.MissingExtraError

MissingExtraError(
    *, extra: str, package: str, purpose: str
)

Bases: PyflightstreamError, ImportError

A code path needs an optional extra that is not installed.

One type for every extra, so except MissingExtraError handles the whole class, and an ImportError second base so the clauses that caught the old refusals keep catching this one.

Attributes:

Name Type Description
extra str

Name of the extra, as pip install pyflightstream[<extra>] spells it.

package str

The distribution or module that was actually missing.

remedy str

The exact install command, composed from extra rather than written out, so it cannot name an extra that does not exist, and quoted (pip install "pyflightstream[<extra>]") so a shell that expands brackets runs it as typed.

pyflightstream.exceptions.PyflightstreamError

Bases: Exception

Base of every CATALOGUED exception this package defines (SRS FR-39).

Catch it instead of importing the leaf types one by one, or widening to ValueError. Read the word CATALOGUED before relying on it: a residual of bare standard-library raises survives in the package. Every site the guard's walk REACHES is named in the ratchet in tests/tier1_offline/test_exceptions_catalog.py, which is the single home of that list; the walk's own reach is stated in that same module (SRS FR-39 states only the one base), and at least one site sits outside it. Those escape this base.

The standard-library base of each catalogued class is kept as a second base, so except ValueError catches what it always did. That is the fallback for most of the residual and not for all of it: the residual is mostly ValueError and also holds TypeError and RuntimeError sites, and the ratchet names the type per site. A caller who needs to be exhaustive today catches PyflightstreamError and the standard-library bases together.

from pyflightstream.exceptions import PyflightstreamError from pyflightstream.versions import resolve try: ... resolve("25.3") ... except PyflightstreamError as error: ... print(type(error).name) UnknownVersionError

Every leaf also inherits its standard-library exception base: UnknownVersionError is a ValueError, WorkspaceError a RuntimeError, and OptionError a KeyError. Callers can catch either that specific standard-library category or the package base.

Not a parent of :class:~pyflightstream.results.VersionMismatchWarning, which is a warning rather than an error. FR-39 asks for a base of every raised EXCEPTION and for a catalog of every exception AND warning, and those are deliberately two different sets: a warning is delivered through :mod:warnings and selected by category, and calling it an Error would misname it for the one reader who matters, the one reading a traceback.

Advanced

pyflightstream.exceptions.AliasCycleError

Bases: PyflightstreamError, ValueError

An alias resolves through itself, and both sides are named (FR-59).

An alias may name another alias, resolved to the end. That is what makes a cycle possible, so the reader refuses one rather than recursing: the message names the alias that closed the ring and the member that closed it, because a reader holding only one of the two names has to open the file to find the other.

pyflightstream.exceptions.AmbiguousLoadsError

Bases: PyflightstreamError, ValueError

Several collected outputs of one run parse as loads spreadsheets.

The resolver refuses to guess which table is the run's coefficient evidence; pass loads_file with the exact exported file name.

pyflightstream.exceptions.AnchorNotFoundError

Bases: PyflightstreamError, ValueError

A printed label or table header was not found in the output.

Anchor-based parsing refuses to fall back to line offsets; a missing anchor means the file is not the expected kind of output or the format changed, and both must surface loudly.

pyflightstream.exceptions.AtmosphereError

Bases: PyflightstreamError, ValueError

An atmosphere was asked for outside the range this module models.

Catalogued (SRS FR-39) rather than a bare :class:ValueError, so a caller can tell a refusal of this package's from one of Python's.

pyflightstream.exceptions.BoundaryMarkingError

Bases: PyflightstreamError

A marking pass failed its solver execution or saved-state read-back.

pyflightstream.exceptions.BrokenCommandError

Bases: PyflightstreamError, RuntimeError

A command recorded broken in the target version was emitted.

broken is the one status backed by a probe that measured the command failing to do what the manual documents (CONTRIBUTING.md invariant 3), so the database already knows the emission is wrong before the solver ever sees it. Unlike a removed command, this one exists and the solver accepts the line: the run therefore produces numbers, and they are the wrong numbers, with nothing in the manifest to distinguish them from right ones. That is why the refusal happens here rather than being left to a warning.

A RuntimeError rather than a ValueError because no argument is at fault: the call is well formed and the recorded state of the world is what refuses it, the same shape as :class:~pyflightstream.workspace.WorkspaceError.

The refusal has an answer, deliberately, because two callers legitimately need the command: a probe re-measuring the record, and an operator who has established that the defect does not reach their case. :meth:Script.allow_broken is that answer, and it records what it waived (see :class:BrokenCommandUse).

pyflightstream.exceptions.BuildCapabilityError

Bases: WorkflowCoverageError

A row asks a build for a feature that only a capability the build lacks provides.

Raised by :func:march_strategy before the first emission, so a plan reports the point BLOCKED with this sentence and nothing is spent. The message names the build, each feature the row asked for, the builds that do document the capability, and what to write instead. A subclass of :class:WorkflowCoverageError, because it is the same kind of answer: the row is well formed and this build cannot run it as written.

pyflightstream.exceptions.CalibrationError

CalibrationError(
    message: str,
    *,
    path: Path | None = None,
    line: int | None = None,
)

Bases: PyflightstreamError, ValueError

A calibration file cannot be read, or cannot be built from the runs it names.

Raised whole at load, naming the file and the line: nothing of a file that is refused is applied. (The pproc's [qsteady_correction] table is refused by its own model, as every pproc table is.) path is the file (None for text parsed with no file) and line the 1-based line the refusal points at, None where the whole file is at fault.

pyflightstream.exceptions.CampaignConfigError

Bases: PyflightstreamError, ValueError

A campaign or case definition cannot be used as written.

A sweep point that cannot be tagged, a campaign file that does not load, a recipe that does not resolve to a callable or whose signature the loop cannot call. Distinct from :class:~pyflightstream.cases.matrix.MatrixError, which is about the pipe-delimited run-matrix format specifically.

Also inherits from ValueError.

pyflightstream.exceptions.CampaignErrors

CampaignErrors(
    failures: list[RunRecord],
    records: list[RunRecord] | None = None,
)

Bases: PyflightstreamError, RuntimeError

One or more campaign points failed; raised after the loop.

Every failed point is listed with its status and error text, and all points, failed or not, are already in the manifest: the exception reports, it never hides.

Attributes:

Name Type Description
failures list of RunRecord

The manifest records of the failed points.

records list of RunRecord

Every record the call wrote, failed or not, in the order it wrote them; the failures alone when the raiser did not pass them.

pyflightstream.exceptions.CheckFailedError

CheckFailedError(check: Mapping)

Bases: InputValueError

A check measured as failed where the construction cannot go on; it carries the check.

Raised as an input error, so a direct caller is refused with the check's id and note; a run records the carried check in the sub-step that owns it and stops there as failed.

pyflightstream.exceptions.CommandDatabaseError

Bases: PyflightstreamError, ValueError

The command database itself cannot be loaded as written.

Raised by :meth:CommandRegistry.load when the chapter files disagree with each other, for instance when two of them define the same command name. This is a defect in the database, not in the caller's script, and it is fatal: nothing downstream can be built from a registry that does not know which entry a name means.

Keeps ValueError as a base, so an existing except ValueError around a registry load catches what it caught before.

CATCH ValueError, NOT PyflightstreamError, and the difference is not pedantry on this class. Only the duplicate-name check in :meth:CommandRegistry.load reaches a caller as this type. Every other raise site is inside a pydantic model validator, and pydantic converts what a validator raises into pydantic.ValidationError, which IS a ValueError and is NOT a PyflightstreamError. FR-39's first clause is about the exceptions this package delivers itself; most of this class's raises are delivered by pydantic instead.

pyflightstream.exceptions.ContractNotImplementedError

Bases: PyflightstreamError, NotImplementedError

A contract function whose body its work package has not filled yet.

Defined here because run, cases, post and floor modules use this exception for unimplemented contracts. Its standard-library base is NotImplementedError, a RuntimeError, so except RuntimeError catches it too.

pyflightstream.exceptions.DemotedRefusalWarning

Bases: PyflightstreamWarning

An offending input was skipped without changing the correctness of written results.

pyflightstream.exceptions.DuplicateValueWarning

Bases: DemotedRefusalWarning

An identical repeated value was ignored.

pyflightstream.exceptions.EmptySelectionWarning

Bases: DemotedRefusalWarning

A selection names no applicable entries and was skipped.

pyflightstream.exceptions.ExcelSyncError

Bases: PyflightstreamError, ValueError

A preview or apply cannot preserve an unambiguous matrix meaning.

pyflightstream.exceptions.ExecutorConfigurationError

Bases: PyflightstreamError, ValueError

The executor cannot run as configured.

Raised at construction time, because a missing solver executable must surface before a campaign starts, not at its first point. The FlightStream path is always explicit input (SAD Section 5): nothing is read from environment variables or guessed.

pyflightstream.exceptions.FarfieldInputError

Bases: PyflightstreamError, ValueError

A far-field reduction was given fields it cannot integrate.

Survey fields missing a sample array the ledger needs, a harmonic request the azimuthal sampling cannot resolve, a flux or moment call whose arrays do not agree on shape or frame, a station the lattice does not carry.

Also inherits from ValueError.

pyflightstream.exceptions.FieldNotInExportError

Bases: PyflightstreamError, KeyError

A named field is not among the columns an export printed.

KeyError as the second base, because that is what a mapping lookup by name has always raised here and user code catching it must keep working (FR-39).

pyflightstream.exceptions.FlightConditionError

Bases: PyflightstreamError, ValueError

A flight condition does not determine exactly one flow state.

Catalogued (SRS FR-39) rather than a bare :class:ValueError, and raised BEFORE any script is emitted and before any solver exists, which is the whole point of stating a condition declaratively.

pyflightstream.exceptions.FsiExternalSetupError

Bases: PyflightstreamError, ValueError

An external FSI input cannot name a program the plan can hash and the step can run.

pyflightstream.exceptions.FsiInputError

FsiInputError(
    *args: object, problems: tuple[str, ...] = ()
)

Bases: PyflightstreamError, ValueError

Data handed to the coupling cannot describe a blade.

A shape that does not match the node map, a station count that disagrees with the configuration, a displacement file that belongs to another layout, a non-finite value where a length or a load is required.

It keeps ValueError as a base, so code that already wrote except ValueError around a coupling call catches exactly what it caught before; what changes is that except PyflightstreamError now catches it too.

Defined here (AD-10) because TWO LAYERS name it: the coupling (fsi) and the sectional loads parser of the results row, which moved there so the results row imports nothing of fsi. Import it from :mod:pyflightstream.fsi.errors or the catalog, as before.

Preserve exception arguments and expose individual resume mismatches.

Parameters:

Name Type Description Default
*args object

Diagnostic arguments accepted by ValueError.

()
problems tuple of str

Individual persisted-array mismatches, empty for other refusals.

()

pyflightstream.exceptions.FsiSetupError

Bases: PyflightstreamError, ValueError

An FSI artifact cannot define an admissible existing beam model.

pyflightstream.exceptions.IncompleteOutputError

Bases: PyflightstreamError, ValueError

The output file ends before its structural terminator.

A loads spreadsheet without its footer or a table without its closing dashed line means the solver stopped mid-write; the campaign records the point as FAILED_INCOMPLETE_OUTPUT instead of consuming a silently shorter table (FR-17).

pyflightstream.exceptions.InputArtifactError

InputArtifactError(
    message: str,
    *,
    kind: str | None = None,
    artifact_id: str | None = None,
    available: tuple[str, ...] = (),
    where: dict | None = None,
)

Bases: PyflightstreamError, RuntimeError

An input artifact cannot be resolved or validated.

Raised when an id is unknown (the message lists the available ids of that kind), when an artifact file does not validate against its model, or when a geometry or profile id matches more than one staged file. Input mistakes must surface at resolution time, before any solver run consumes the artifact.

Import it from :mod:pyflightstream.workspace, which owns the input library it describes, or from :mod:pyflightstream.exceptions:

from pyflightstream.workspace import InputArtifactError

It is DEFINED here rather than there because two layers name it: the workspace layer raises it, and the layers that bind a run matrix to the input library catch it and re-raise with the row and the file they were resolving. Defining it in the workspace package made the lower one import upward, which is the deferred-import shape the layering guard refuses (OPS-2007.02.01). The public name is unchanged and so is the pair of bases, so except RuntimeError catches exactly what it always did.

Attributes:

Name Type Description
kind str or None

Artifact kind of the failed resolution ("reference", "setup", ...), when the refusal is a miss.

artifact_id str or None

The id that failed to resolve, when the refusal is a miss.

available tuple of str

Ids that would have resolved for the kind, so callers can offer choices without parsing the message. It is populated on a NOT-FOUND refusal and is EMPTY on a refusal about the id's own shape, which is about what the caller wrote rather than about what the library holds. The distinction is stated because an empty tuple would otherwise be read as an empty library; tests/tier1_offline/test_exceptions_catalog.py pins both branches.

where dict

Optional diagnostic locations: family names, zero-based mesh vertex indices in nodes, and mesh-coordinate triples in points.

pyflightstream.exceptions.InputTypeError

Bases: PyflightstreamError, TypeError

An argument given by the user has the wrong type; the message names the remedy.

The family's home for a refusal that had been a bare TypeError; TypeError stays a base.

pyflightstream.exceptions.InputValueError

Bases: PyflightstreamError, ValueError

A value given by the user cannot be used; the message names the cause and the remedy.

The family's home for a refusal that had been a bare ValueError and has no domain class of its own. ValueError stays a base, so except ValueError still catches it.

pyflightstream.exceptions.KernelUnavailableError

KernelUnavailableError(*, purpose: str, reason: str)

Bases: MissingExtraError

The CAD kernel library is not installed or cannot load in this environment.

A :class:MissingExtraError, so a handler written for the missing extra still catches it. It is raised for an ImportError and for an OSError (a shared library the kernel needs failed to load, which import reports as OSError). The message names the library that failed, from the original error, the Linux package line, and that the stages that build surfaces without the kernel (S0 to S9) still run.

pyflightstream.exceptions.LoadsNotFoundError

Bases: PyflightstreamError, ValueError

No collected output of a run yields its loads spreadsheet.

Expected for failed points: a run that stopped before EXPORT_SOLVER_ANALYSIS_SPREADSHEET leaves no coefficient table behind, and :func:sweep_table turns this into a row without coefficient columns instead of dropping the run.

pyflightstream.exceptions.MalformedOutputError

Bases: PyflightstreamError, ValueError

An output file is present and whole but cannot be read as itself.

The sibling of :class:IncompleteOutputError, and deliberately a different type: incomplete means the solver stopped mid-write, this means the bytes are all there and do not describe what the file claims to be. A duplicated column, a second concatenated export, a fractional or negative count, and a token that is not a number all land here.

Also inherits from ValueError, so callers can catch either the package error base or the standard value-error base.

pyflightstream.exceptions.ManualCallError

Bases: PyflightstreamError, TypeError

A drafting function was called with the wrong argument shape.

The library raises nothing of this class today. propose_type takes its two strings as keywords only (PFS-2022.05), so a call with the strings positional, twice or missing raises Python's own TypeError, which is what the signature itself refuses with. The class stays in the catalogue for callers that name it.

TypeError as the second base, because that is what a wrong call shape raised before the catalogue held a class for it, and what a caller written against it would still catch (FR-39).

pyflightstream.exceptions.ManualDraftError

Bases: PyflightstreamError, ValueError

A draft was asked for something a manual cannot support.

Raised where the caller asks the drafting functions to record more than the source they are reading can justify, the sharp case being a verified or broken status: those are promoted from a committed probe report by pyfs-qa apply-compat, never from a page citation (CONTRIBUTING.md invariant 3).

ValueError as the second base, because that is what this refusal raised before the catalogue existed and what a caller written against it would still catch (FR-39).

pyflightstream.exceptions.MatrixError

Bases: PyflightstreamError, ValueError

A run-matrix file does not match the verified layout.

The reader supports exactly the verified format (FR-10); a deviation means the file is not a run matrix or was edited beyond what the matrix workflow produces.

pyflightstream.exceptions.MeshFrameError

Bases: PyflightstreamError, ValueError

A declared mesh frame that cannot be read or converted from (PFS-2233).

It keeps ValueError, the base it was defined with, so except ValueError around a sidecar read catches what it caught before. Defined here, beside the package base, so the catalog names it without importing the mesh-frame module; import it from :mod:pyflightstream.workspace._mesh_frame or the catalog.

pyflightstream.exceptions.MeshReadError

Bases: PyflightstreamError, ValueError

A saved simulation carries a mesh block this reader cannot trust.

The boundary readers raise it only for a block that OPENS and then does not hold its shape. A file carrying no mesh block at all is not an error to them and reads as None: the campaign suite stages placeholder geometries deliberately, and FR-30c already licenses an undeclared inventory as permissive. The two readers of the block's CONTENTS, :func:surface_mesh and :func:trailing_edge_midpoints, refuse a file with no block, because they are asked for what the block holds and None would read as an empty mesh.

pyflightstream.exceptions.MissingOutputsError

MissingOutputsError(
    message: str,
    *,
    collected: list[str],
    missing: list[str],
)

Bases: WorkspaceError

Declared outputs were not produced, and the ones that were ARE collected.

Raised by the workspace's collect_outputs after it has filed every declared output that exists, so a run that failed to write one file never strands the others outside the point's folder.

A :class:WorkspaceError, so a caller that caught that still catches this; a caller that records the point reads what was filed from collected.

Attributes:

Name Type Description
collected list of str

The outputs filed, relative to the simulation folder, as the workspace's collect_outputs returns them.

missing list of str

The declared outputs that do not exist, as they were declared.

pyflightstream.exceptions.NamingTemplateError

Bases: PyflightstreamError, ValueError

A naming template cannot be validated or rendered.

Raised when a template names an unknown placeholder, when a placeholder has no value on the current point (for example {mach} on a case without a Mach number), or when a rendered name would not be a portable file name. The message lists what is available, because a naming mistake must surface before any solver run, not as a cryptic OS error mid-campaign.

pyflightstream.exceptions.NotApplicableWarning

Bases: DemotedRefusalWarning

An entry does not apply to this run type, build or geometry and was skipped.

pyflightstream.exceptions.OpenMeshError

Bases: PyflightstreamError, ValueError

The surface mesh is not watertight.

Inside/outside is undefined for an open surface (a half model cut by a symmetry plane, an unclosed trailing edge): the ray-parity test would return arbitrary answers, so the gate refuses instead of guessing.

pyflightstream.exceptions.OptionError

Bases: PyflightstreamError, KeyError

An option key is unknown, or a value fails its validator.

Raised with the didactic message contract of the module: unknown keys list every registered key; rejected values name the option, the received value, and the accepted form.

pyflightstream.exceptions.OutputExistsError

Bases: ProductExistsError, FileExistsError

A flow-visualization file would be overwritten (PFS-2011.02).

Both writers ended in an unconditional write_text, so a second call with the same destination replaced the first silently. That is the same class as the campaign defect PYFS-005 records: one point of a run overwrote another's output while the record listed both complete, which cost licensed solver time and could have published a report from one point counted twice.

overwrite=True is the only way through and each writer's docstring says so.

It keeps FileExistsError as its second base for the reason FR-39 gives for every catalogued class: an existing except FileExistsError around a write catches exactly what it caught before, and it is the handler a caller writing a file already has. The evidence writers under qa raise the BUILTIN for the same situation, deliberately, because that predates the catalogue's reach; a new raise site takes the catalogued type.

It is also a :class:~pyflightstream._errors.ProductExistsError, the class the product writers raise for the same situation, so one handler catches both (the decision of PFS-2124.037: the two classes signal one condition).

pyflightstream.exceptions.PhysicsEnvironmentError

Bases: PyflightstreamError, RuntimeError

The physics run cannot start as configured.

Raised before any row runs: a workspace without the physics matrix, rows naming two builds, or a row naming a case the registry does not know must surface immediately, not after minutes of solver time.

pyflightstream.exceptions.ProbeEnvironmentError

Bases: PyflightstreamError, RuntimeError

The probe environment is unusable, so no command was judged.

Raised when the baseline probe fails (solver not starting, license checkout failure, log export not landing) or when a probe working directory cannot be prepared safely. Environment failures abort the run because recording them as broken commands would be false evidence.

pyflightstream.exceptions.ProbeGeometryError

Bases: PyflightstreamError, ValueError

Survey geometry that does not describe a measurable arrangement.

Non-physical radii or stations, an axis specification that cannot be walked, a refinement band outside its plane, a position set that does not verify against the lattice it claims. Raised by the cylindrical lattice, the planar grids and the geometry gate alike, so one except covers the survey-geometry surface.

Also a ValueError so callers can catch either exception family (FR-39).

pyflightstream.exceptions.ProductArgumentError

Bases: PyflightstreamError, TypeError

A product writer was called with arguments that contradict each other.

An argument misuse and not a datum, so the standard-library base is TypeError and not ValueError: except TypeError catches it exactly as it caught the bare raise this replaced. Beside ProductError below because the same two layers name both (the step= / iteration= deprecation of write_sections_table).

pyflightstream.exceptions.ProductError

Bases: PyflightstreamError, ValueError

A product cannot be written from what the run left.

Defined in the shared error catalogue so callers can catch a product refusal without importing the post-processing layer.

post.products re-exports it, so the public name and the pair of bases are unchanged and except ValueError catches exactly what it always did.

pyflightstream.exceptions.ProductExistsError

Bases: ProductError

A product exists and overwrite was not given.

Its own class because the campaign writer treats it differently from every other refusal (PFS-2031.16): a refusal about one simulation's content is recorded as a skip and the other simulations are written, while this one is about the caller's flag and stops the stage.

pyflightstream.exceptions.PyflightstreamDeprecationWarning

Bases: PyflightstreamWarning, FutureWarning

A part of this package's own interface is going away.

Through :class:PyflightstreamWarning, one warning filter selects it with the rest of this package's warnings. Through :class:FutureWarning, a person reading a TOML file or using the command line sees the rename under the interpreter's default filters, once per message and location. A caller can filter this category explicitly; dependency deprecations retain their own categories and filters.

Use it where this package deprecates one of its OWN arguments, names or behaviours. An upstream deprecation this package merely passes on is not ours and keeps its own category.

Examples:

>>> from pyflightstream._errors import (
...     PyflightstreamDeprecationWarning,
...     PyflightstreamWarning,
... )
>>> issubclass(PyflightstreamDeprecationWarning, PyflightstreamWarning)
True
>>> issubclass(PyflightstreamDeprecationWarning, FutureWarning)
True

pyflightstream.exceptions.PyflightstreamWarning

Bases: UserWarning

The category that says a warning came from THIS package.

It exists for one job: the executable-examples run promotes warnings to errors so a stale example fails CI, and promoting every warning means a dependency's next release turns that build red for something nobody here can fix. Naming one category scopes the promotion to what this repository is responsible for.

UserWarning is kept as the base, so -W error::UserWarning, simplefilter("ignore", UserWarning) and every other selection a caller already had keep catching what they caught. The addition is widening, exactly as :class:PyflightstreamError was.

NOT a subclass of :class:PyflightstreamError, and the split is the same one that requirement FR-39 draws: the base is for every catalogued EXCEPTION, and a warning is delivered through :mod:warnings and selected by category rather than raised and caught. Calling it an Error would misname it for the reader of a traceback.

Import the category from :mod:pyflightstream.exceptions, the public exception and warning catalog. The package's warning categories derive from this class, so filtering it selects package warnings without selecting unrelated dependency warnings.

Examples:

>>> import warnings
>>> from pyflightstream.exceptions import PyflightstreamWarning
>>> with warnings.catch_warnings(record=True) as caught:
...     warnings.simplefilter("always")
...     warnings.warn("the campaign declares no outputs", PyflightstreamWarning)
>>> caught[0].category.__name__
'PyflightstreamWarning'
>>> issubclass(PyflightstreamWarning, UserWarning)
True

pyflightstream.exceptions.QaEvidenceError

Bases: PyflightstreamError, ValueError

A committed QA artifact cannot be read as the evidence it claims.

A reference or report whose schema, version basis or metric set does not parse, a geometry manifest that disagrees with the mesh it describes, an update that would overwrite evidence with something not comparable to it. The QA layer refuses rather than guessing, because its whole output is evidence.

FR-39: ValueError is a second base so except ValueError also catches this refusal.

pyflightstream.exceptions.QsteadyRecordError

Bases: PyflightstreamError, ValueError

A point's quasi-steady record is missing, unreadable, or of no schema this package writes.

The one refusal of :func:read_qsteady_record, whatever is wrong with the file, so that the callers, and not the reader, decide what the point loses: the run judges the point's solver log as one solve and records a warning on the point; the post leaves out each product that needs the record and names it in products.json and post.log.

pyflightstream.exceptions.RecordsError

Bases: PyflightstreamError, ValueError

A restore or a rebuild refused, before anything was written.

ValueError because what is refused is the request as given: a kind, a stamp, a manifest name, a combination of options, or a workspace state the request cannot be carried out in exactly.

pyflightstream.exceptions.RetiredAttributeError

Bases: PyflightstreamError, AttributeError

A retired ATTRIBUTE was reached for, and the message says what to write.

IT HAS TWO PARENTS BECAUSE TWO READINGS ARE BOTH RIGHT. Reaching for a name this package no longer defines is an attribute mistake, so except AttributeError must keep catching it; and it is also this package refusing something on purpose, so the one category the documentation tells callers to catch, :class:~pyflightstream.exceptions.PyflightstreamError, must reach it too. Both handlers receive the registry's actionable refusal message.

This is not a new pattern, and the ORDER of the bases is the house's too: :class:~pyflightstream.exceptions.MatrixError, ManualCallError, OutputExistsError and InputArtifactError all name PyflightstreamError first and the standard-library base second. Here the second seat is AttributeError because that is the shape of the mistake being made.

IT IS NAMED FOR AN ATTRIBUTE AND NOT FOR THE REGISTRY, which retires nine spellings of which this covers one. The other eight are values inside FILES, and they cannot use this class rather than merely choosing not to: they refuse inside pydantic field validators, which intercept only ValueError and AssertionError, so an AttributeError raised there would escape the model uncaught instead of arriving as the artifact's own refusal. They raise ValueError and surface as :class:~pyflightstream.exceptions.InputArtifactError, which is already in the package category. Calling this class RetiredNameError would promise a reader that except on it catches a retired [propeller] table, and it does not.

It carries no attributes of its own. The refusal facts live on the :class:RetiredName entry in this private module and are not public fields.

Examples:

>>> from pyflightstream.exceptions import (
...     PyflightstreamError,
...     RetiredAttributeError,
... )
>>> issubclass(RetiredAttributeError, PyflightstreamError), issubclass(
...     RetiredAttributeError, AttributeError
... )
(True, True)

pyflightstream.exceptions.RetiredKeyWarning

Bases: UnknownKeyWarning

A retired spelling was ignored; use the replacement named in the message.

pyflightstream.exceptions.RunsManifestError

Bases: PyflightstreamError, ValueError

A manifest name that does not name a file directly in the workspace root.

ValueError because the refused thing is the NAME a caller passed, before any file is read.

pyflightstream.exceptions.ScriptDeclarationTypeError

Bases: PyflightstreamError, TypeError

An entity declaration is neither a count nor a label mapping.

The last of the three bare standard-library raises on the public path (OPS-2009.01.08). It refuses the WRONG KIND of argument rather than a bad value, which is why TypeError is kept as its second base: that is how a caller separates "you handed me the wrong sort of thing" from every ValueError-based refusal beside it, and an existing except TypeError around a declaration catches exactly what it caught before.

Raised by :meth:EntityRegistry.declare_boundaries when a declaration is neither a zero or positive integer total nor a mapping of labels to 1-based indices, and by :meth:EntityRegistry.declare when a count is not an integer.

pyflightstream.exceptions.ScriptLabelError

Bases: PyflightstreamError, ValueError

A label registration collides with a label already recorded.

Labels identify exactly one entity per kind, because they resolve to a single FlightStream index at emission; reusing a label would silently redirect every earlier citation. Pick a distinct label or cite the existing entity by its index.

pyflightstream.exceptions.ScriptLineBreakError

Bases: CommandArgumentError

A value would have become more than one line of the script.

FlightStream reads a script one command per physical line, and this library's contract is that every line it writes came from a validated command. A line terminator inside an argument breaks both at once: the text after it is not an argument any more, it is the next COMMAND, and the manifest still presents the script as fully validated because raw_flag was never set.

The escape hatch for genuinely unvalidated text is :meth:Script.raw, which exists precisely so that this refusal has an answer: it appends the text and sets raw_flag, so the script carries the fact that something in it was not checked (FR-07).

Subclasses :class:CommandArgumentError so existing handlers keep working; caught on its own it identifies this one cause.

pyflightstream.exceptions.ScriptOrderError

Bases: PyflightstreamError, ValueError

A command was emitted after its phase had already passed.

The script builder tracks the highest phase reached (geometry, setup, init, exec, analysis, export); FlightStream expects auxiliary definitions such as coordinate systems, actuators, and motions before solver initialization. Control commands are exempt, and a setup command that acts on an initialised solver passes through :meth:Script.emit_after_initialization alone.

pyflightstream.exceptions.ScriptReferenceError

Bases: PyflightstreamError, ValueError

A command cites an entity that does not exist at that point.

FlightStream resolves frame, actuator, motion, and mesh boundary indices at execution time and fails silently or cryptically when they do not exist; the builder counts the objects the script creates and rejects the citation at build time instead (SAD Section 4.2). Raised both for an index outside the created or declared range and for a label the registry does not know. Objects already present in the opened project file are declared with :meth:pyflightstream.script.Script.declare_existing.

pyflightstream.exceptions.SixDofSetupError

Bases: PyflightstreamError, ValueError

A row's 6DOF input cannot describe a body free to move here.

pyflightstream.exceptions.SolverSetupError

Bases: PyflightstreamError, RuntimeError

The solver-setup snapshot cannot represent a command in its registry.

RuntimeError remains a base for callers already handling this internal consistency refusal through the public solver-settings API.

pyflightstream.exceptions.StaleLoadsError

Bases: PyflightstreamError, ValueError

The loads file did not advance between calls (FSI-R12).

A call receiving the same solver iteration as the previous one is a second FSI iteration inside one time step: the Toolbox is not configured with SET_AEROELASTIC_ITERATIONS 1, and continuing would average duplicated loads and desynchronize the call and step counters. Defined here (the import-light state module) so the exception catalog stays importable without the [fsi] extra; the driver raises it.

pyflightstream.exceptions.StorageError

Bases: WorkspaceError

A storage command refused: the message names what and why.

pyflightstream.exceptions.SurfaceMeshExportError

Bases: PyflightstreamError, RuntimeError

The pre-processing surface-mesh export did not produce its file.

Raised by :func:export_surface_mesh when the solver run failed or finished without writing the requested mesh file; the message carries the process outcome and the captured log excerpt, because hidden-mode failures are otherwise silent (FSM-26.120 p.280).

pyflightstream.exceptions.TwistIterationError

TwistIterationError(
    message: str,
    *,
    residuals_rad: tuple[float, ...] = (),
    tolerance_rad: float = 0.0,
    inner_solves: int = 0,
)

Bases: PyflightstreamError, RuntimeError

The inner twist iteration ran out of solves above its tolerance.

solve_rotating_static iterates the beam solve until the twist distribution stops moving, and returns the last iterate whatever happens. Above tolerance that iterate is NOT a solution: the twist was still changing when the solve budget ran out, so the deflections computed from it describe a blade shape the structural model never settled on.

Until this class existed the driver read only solution from that result, never twist_residual_rad, and wrote those deflections straight into FSIDisp.txt. The solver then flew the unconverged shape, the coupled run continued, and the only trace was a logger.warning nobody reads in a batch run (PYFS-013). Writing the file is the irreversible step, so the refusal is placed before it.

Defined here (the import-light state module) so the exception catalog stays importable without the [fsi] extra; the driver raises it.

Attributes:

Name Type Description
residuals_rad tuple of float

Final twist residual per blade [rad], in blade order.

tolerance_rad float

Threshold they were judged against [rad].

inner_solves int

Solves the worst blade spent before giving up.

pyflightstream.exceptions.UnitsError

Bases: PyflightstreamError, ValueError

The export does not carry the asserted SI units (FSI-R03).

Unit errors in the coupling loop are silent and produce plausible wrong answers, so the parser refuses the file instead of scaling: the post-processing script must compute the sectional loads with COMPUTE_SURFACE_SECTIONAL_LOADS NEWTONS and the solver setup must stay in SI.

pyflightstream.exceptions.UnknownExtraError

Bases: PyflightstreamError, ValueError

A name was used as an optional extra and this package has no such extra.

Raised at the refusal-building step rather than at import: naming a nonexistent extra would send the reader to an install command that fails, which is worse than the missing dependency it was trying to explain.

Also a ValueError for callers handling that exception family (FR-39).

pyflightstream.exceptions.UnknownKeyWarning

Bases: DemotedRefusalWarning

An unknown key, option or table was ignored.

pyflightstream.exceptions.UnknownVersionError

UnknownVersionError(
    message: str,
    *,
    version: str | None = None,
    known: tuple[str, ...] = (),
)

Bases: PyflightstreamError, ValueError

A FlightStream version identifier is not in the ordered registry.

Raised when a canonical identifier or display alias does not match any entry of the ordered list in commands/_meta.yaml. The message lists every known version so the caller can correct the input or register the new version first.

Attributes:

Name Type Description
version str or None

The identifier that failed to resolve or validate; None only when a raiser has no candidate string at hand.

known tuple of str

Canonical identifiers of every registered version, in release order, so callers can react without parsing the message; the word is known here (registered versions are known) while the workspace miss uses available (staged artifacts are available), a deliberate domain distinction.

pyflightstream.exceptions.UnsupportedResultTypeError

Bases: PyflightstreamError, TypeError

:func:~pyflightstream.results.to_table was handed a kind it cannot tabulate.

TypeError as the second base, and it is the whole point of the class rather than a compatibility courtesy: except TypeError is how a caller distinguishes "I passed the wrong KIND of thing" from "I passed a bad VALUE", which is what every ValueError-based refusal in this package means. A handler that already catches TypeError around the call catches exactly what it caught before and except PyflightstreamError now catches it too (FR-39, OPS-2009.01.08).

Raised for a result of a type no parser here produces, and for a :class:pandas.DataFrame, which is a table already and is refused rather than tabulated twice.

pyflightstream.exceptions.VersionMismatchWarning

Bases: PyflightstreamWarning

The version printed in an output disagrees with the requested one.

Warned, not raised: the run evidence is still recorded, with the reported string and build stored verbatim in the manifest (FR-18).

pyflightstream.exceptions.WorkflowCoverageError

Bases: PyflightstreamError, RuntimeError

A workflow was asked for a solver build it does not cover.

Raised BEFORE the first emission and before any executor is constructed, so nothing is spent and no half-built script exists (PFS-2025.18). The message names the build received, the builds the workflow covers in release order, and the commands whose absence forced the range.

RuntimeError is the standard-library base rather than ValueError, because this refusal is about the ENVIRONMENT the script would run in and not about an argument the caller passed: every argument may be perfectly well formed and the answer still be that this build cannot run this study.

There is deliberately NO override route. The escape already exists one level up, in :meth:pyflightstream.script.Script.allow_broken, which is a recorded waiver naming a reason; a second, quieter one here would be a way past the guard that leaves no record.

pyflightstream.exceptions.WorkspaceError

Bases: PyflightstreamError, RuntimeError

A file-management operation was refused or impossible.

The refusals protect run evidence: archiving or cleaning without a manifest record would destroy a run the manifest cannot account for, and collection of a declared output that the solver never produced points at an incomplete run.