Errors¶
Every error fmsave raises on purpose is a FmsaveError; every warning it issues on purpose is a
FmsaveWarning. GateCheckError is the one exception that is also more specific than its base:
it is the ReaderCheckError a save opened with strict=True raises for a failed check.
- exception fmsave.FmsaveError[source]¶
Bases:
ExceptionBase class for every error fmsave raises on purpose.
- exception fmsave.NotAFmSaveError[source]¶
Bases:
FmsaveErrorThe file is not a Football Manager save.
- exception fmsave.CorruptSaveError[source]¶
Bases:
FmsaveErrorThe save is damaged, truncated, or was being written while it was read.
- exception fmsave.UnsupportedGameError[source]¶
Bases:
FmsaveErrorThe save comes from a Football Manager version fmsave cannot read.
- exception fmsave.ReaderCheckError[source]¶
Bases:
FmsaveErrorA reader’s checks failed, so its output would not be trustworthy.
- exception fmsave.GateCheckError(message, checks=())[source]¶
Bases:
ReaderCheckErrorA ReaderCheckError from failed reader checks, carrying every check of the failed pass.
This is what fmsave.open(…, strict=True) raises when an applied check misses its bounds. Catching ReaderCheckError catches it, and checks holds the gate names, the observed values and the bounds the message rounds, so nothing has to be parsed back out of the text. A ReaderCheckError raised for any other reason carries no checks.
- Parameters:
message (str)
checks (tuple[ReaderCheck, ...])
- Return type:
None
- checks¶
Every reader of the failed pass, each with its own gates.
- Type:
- exception fmsave.SaveChangedError[source]¶
Bases:
FmsaveErrorThe save file changed on disk after it was opened.
- exception fmsave.SaveClosedError[source]¶
Bases:
FmsaveErrorA reader was called on a closed save.
- exception fmsave.AmbiguousNameError[source]¶
Bases:
FmsaveErrorA name matched more than one record where exactly one was needed.
- exception fmsave.FmsaveWarning[source]¶
Bases:
UserWarningBase class for every warning fmsave issues on purpose.
- exception fmsave.UnknownBuildWarning[source]¶
Bases:
FmsaveWarningThe save comes from an FM26 build fmsave has no layout tables for.
- exception fmsave.ReaderCheckWarning[source]¶
Bases:
FmsaveWarningA reader’s measured checks failed and it handed its table back anyway.
This is what a failed check does on a save opened without strict=True. The message is the one ReaderCheckError carries on a strict save. A structural failure, where the decode has no table to hand back at all, raises ReaderCheckError whatever the setting.