mafw.mafw_errors

Define exceptions and validation issues used throughout MAFw.

Author:

Bulgheroni Antonio

Description:

Provide common error types for framework and steering failures.

Exceptions

AbortProcessorException

Exception raised during the execution of a processor requiring immediate exit.

AmbiguousProcessor(short_name, alternatives)

Exception raised when an unqualified processor name matches two or more loaded processors.

CyclicGroupIssue(node)

Issue raised when cyclic dependencies exist within processor groups.

DuplicateReplicaIssue(base, replica)

Issue raised when a processor declares duplicate replica identifiers.

InvalidConfigurationError

Error with the configuration of a processor

InvalidEnvironmentFilesIssue()

Issue raised when env_files is not a list of strings.

InvalidFilterConditionIssue(processor, ...)

Issue raised when a filter condition is incomplete or invalid.

InvalidFilterLogicIssue(processor, target, *)

Issue raised when a filter logic expression is invalid.

InvalidSteeringFile

Exception raised when validating an invalid steering file

InvalidStorageConfigurationIssue(detail)

Issue raised when a storage configuration value is invalid.

MAFwException

Base class for MAFwException

MissingAttribute

Exception raised when an attempt is made to execute a statement without a required parameter/attributes

MissingDatabase

Exception raised when a processor requiring a database connection is being operated without a database

MissingOptionalDependency

UserWarning raised when an optional dependency is required

MissingOverloadedMethod

Warning issued when the user did not overload a required method.

MissingProcessorsToRunIssue()

Issue raised when the steering file does not declare processors_to_run.

MissingSQLStatement

Exception raised when a Trigger is created without any SQL statements.

MissingSuperCall

Warning issued when the user did not invoke the super method for some specific processor methods.

MissingUserInterfaceSectionIssue()

Issue raised when the UserInterface section is missing.

ModelError

Exception raised when an error in a DB Model class occurs

ParserConfigurationError

Exception raised when an error occurred during the configuration of a filename parser

ParsingError

Exception raised when a regular expression parsing failed

PlotterMixinNotInitialized

Exception raised when a plotter mixin has not properly initialized

ProcessorParameterError

Error with a processor parameter

ProcessorsToRunNotListIssue()

Issue raised when processors_to_run is not a list.

RunnerNotInitialized

Exception raised when attempting to run a not initialized Runner.

SteeringFileDeprecation

Warning issued when a legacy deprecated configuration is used in the steering file.

UnknownDBEngine

Exception raised when the user provided an unknown db engine

UnknownGroupMemberIssue(group, member)

Issue raised when a group references an unknown processor or nested group.

UnknownProcessor

Exception raised when an attempt is made to create an unknown processor

UnknownProcessorGroup

Exception raised when an attempt is made to create an unknown processor group

UnknownProcessorsToRunEntryIssue(entry)

Issue raised when a processor reference in processors_to_run cannot be resolved.

UnsupportedDatabaseError

Error raised when a feature is not supported by the database.

ValidationIssue(message)

Base class for steering validation issues.

exception mafw.mafw_errors.AbortProcessorException[source]

Bases: MAFwException

Exception raised during the execution of a processor requiring immediate exit.

exception mafw.mafw_errors.AmbiguousProcessor(short_name: str, alternatives: list[str])[source]

Bases: MAFwException

Exception raised when an unqualified processor name matches two or more loaded processors.

Two installed plugin packages may export processors that share the same short class name (the Short_Name). In that case an unqualified reference such as SameNameProcessor is ambiguous: the name is known, but it is under-specified. Rather than silently picking one of the colliding processors, MAFw refuses the reference and reports the available Qualified_Name alternatives (package.ShortName), one per line, so the user can select the intended processor unambiguously.

Added in version v2.4.

Parameters:
  • short_name (str) – The ambiguous short name that matched several processors.

  • alternatives (list[str]) – The sorted qualified names available for that short name.

exception mafw.mafw_errors.CyclicGroupIssue(node: str)[source]

Bases: ValidationIssue

Issue raised when cyclic dependencies exist within processor groups.

exception mafw.mafw_errors.DuplicateReplicaIssue(base: str, replica: str)[source]

Bases: ValidationIssue

Issue raised when a processor declares duplicate replica identifiers.

exception mafw.mafw_errors.InvalidConfigurationError[source]

Bases: MAFwException

Error with the configuration of a processor

exception mafw.mafw_errors.InvalidEnvironmentFilesIssue[source]

Bases: ValidationIssue

Issue raised when env_files is not a list of strings.

exception mafw.mafw_errors.InvalidFilterConditionIssue(processor: str, model: str, condition: str, *, field_name: str | None = None, reason: str | None = None)[source]

Bases: ValidationIssue

Issue raised when a filter condition is incomplete or invalid.

exception mafw.mafw_errors.InvalidFilterLogicIssue(processor: str, target: str, *, detail: str | None = None)[source]

Bases: ValidationIssue

Issue raised when a filter logic expression is invalid.

exception mafw.mafw_errors.InvalidSteeringFile[source]

Bases: MAFwException

Exception raised when validating an invalid steering file

exception mafw.mafw_errors.InvalidStorageConfigurationIssue(detail: str)[source]

Bases: ValidationIssue

Issue raised when a storage configuration value is invalid.

Parameters:

detail – Description of the invalid section, volume, or property.

Added in version 2.4.

exception mafw.mafw_errors.MAFwException[source]

Bases: Exception

Base class for MAFwException

exception mafw.mafw_errors.MissingAttribute[source]

Bases: MAFwException

Exception raised when an attempt is made to execute a statement without a required parameter/attributes

exception mafw.mafw_errors.MissingDatabase[source]

Bases: MAFwException

Exception raised when a processor requiring a database connection is being operated without a database

exception mafw.mafw_errors.MissingOptionalDependency[source]

Bases: UserWarning

UserWarning raised when an optional dependency is required

exception mafw.mafw_errors.MissingOverloadedMethod[source]

Bases: UserWarning

Warning issued when the user did not overload a required method.

It is a warning and not an error because the execution framework might still work, but the results might be different from what is expected.

exception mafw.mafw_errors.MissingProcessorsToRunIssue[source]

Bases: ValidationIssue

Issue raised when the steering file does not declare processors_to_run.

exception mafw.mafw_errors.MissingSQLStatement[source]

Bases: MAFwException

Exception raised when a Trigger is created without any SQL statements.

exception mafw.mafw_errors.MissingSuperCall[source]

Bases: UserWarning

Warning issued when the user did not invoke the super method for some specific processor methods.

Those methods (like start() and finish()) have not empty implementation also in the base class, meaning that if the user forgets to call super in their overloads, then the basic implementation will be gone.

It is a warning and not an error because the execution framework might sill work, but the results might be different from what is expected.

exception mafw.mafw_errors.MissingUserInterfaceSectionIssue[source]

Bases: ValidationIssue

Issue raised when the UserInterface section is missing.

exception mafw.mafw_errors.ModelError[source]

Bases: MAFwException

Exception raised when an error in a DB Model class occurs

exception mafw.mafw_errors.ParserConfigurationError[source]

Bases: MAFwException

Exception raised when an error occurred during the configuration of a filename parser

exception mafw.mafw_errors.ParsingError[source]

Bases: MAFwException

Exception raised when a regular expression parsing failed

exception mafw.mafw_errors.PlotterMixinNotInitialized[source]

Bases: MAFwException

Exception raised when a plotter mixin has not properly initialized

exception mafw.mafw_errors.ProcessorParameterError[source]

Bases: MAFwException

Error with a processor parameter

exception mafw.mafw_errors.ProcessorsToRunNotListIssue[source]

Bases: ValidationIssue

Issue raised when processors_to_run is not a list.

exception mafw.mafw_errors.RunnerNotInitialized[source]

Bases: MAFwException

Exception raised when attempting to run a not initialized Runner.

exception mafw.mafw_errors.SteeringFileDeprecation[source]

Bases: UserWarning

Warning issued when a legacy deprecated configuration is used in the steering file.

It is a warning and not an error because the execution framework might still work, but the configuration may be removed in future versions.

exception mafw.mafw_errors.UnknownDBEngine[source]

Bases: MAFwException

Exception raised when the user provided an unknown db engine

exception mafw.mafw_errors.UnknownGroupMemberIssue(group: str, member: str)[source]

Bases: ValidationIssue

Issue raised when a group references an unknown processor or nested group.

exception mafw.mafw_errors.UnknownProcessor[source]

Bases: MAFwException

Exception raised when an attempt is made to create an unknown processor

exception mafw.mafw_errors.UnknownProcessorGroup[source]

Bases: MAFwException

Exception raised when an attempt is made to create an unknown processor group

exception mafw.mafw_errors.UnknownProcessorsToRunEntryIssue(entry: str)[source]

Bases: ValidationIssue

Issue raised when a processor reference in processors_to_run cannot be resolved.

exception mafw.mafw_errors.UnsupportedDatabaseError[source]

Bases: Exception

Error raised when a feature is not supported by the database.

exception mafw.mafw_errors.ValidationIssue(message: str)[source]

Bases: InvalidSteeringFile

Base class for steering validation issues.