id_translation.mapping.exceptions#

Mapping errors.

Exceptions

AmbiguousScoreError(kind, key, match0, ...)

Indicates that the scoring logic has produces ambiguous scores.

BadFilterError(msg, *[, ref])

Invalid filter.

CardinalityError(msg, *[, ref])

Base class for cardinality issues.

MappingError(msg, *[, ref])

Base exception class for all mapping-related issues.

MappingWarning

Base warning class for all mapping-related issues.

ScoringDisabledError(value, candidates, context)

Indicates that the scoring logic has been disabled.

UnmappedExplicitNamesError(msg, *, names, ...)

Raised when names explicitly provided by the user could not be mapped.

UnmappedValuesError(msg, *[, ref])

Raised when there are unmapped values left after filtering and on_unmapped='raise'.

UnmappedValuesWarning

Raised when there are unmapped values left after filtering and on_unmapped='raise'.

UserMappingError(msg, value, candidates)

A user-defined mapping function did something forbidden.

UserMappingWarning

A user-defined mapping function did something strange.

exception AmbiguousScoreError(kind, key, match0, match1, cardinality, scores)[source]#

Bases: MappingError

Indicates that the scoring logic has produces ambiguous scores.

exception BadFilterError(msg, *, ref='')[source]#

Bases: MappingError

Invalid filter.

exception CardinalityError(msg, *, ref='')[source]#

Bases: MappingError

Base class for cardinality issues.

exception MappingError(msg, *, ref='')[source]#

Bases: Exception

Base exception class for all mapping-related issues.

exception MappingWarning[source]#

Bases: UserWarning

Base warning class for all mapping-related issues.

exception ScoringDisabledError(value, candidates, context)[source]#

Bases: MappingError

Indicates that the scoring logic has been disabled. Raised by score_functions.disabled().

exception UnmappedExplicitNamesError(msg, *, names, unmapped)[source]#

Bases: MappingError

Raised when names explicitly provided by the user could not be mapped.

exception UnmappedValuesError(msg, *, ref='')[source]#

Bases: MappingError

Raised when there are unmapped values left after filtering and on_unmapped=’raise’.

exception UnmappedValuesWarning[source]#

Bases: MappingWarning

Raised when there are unmapped values left after filtering and on_unmapped=’raise’.

exception UserMappingError(msg, value, candidates)[source]#

Bases: MappingError

A user-defined mapping function did something forbidden.

exception UserMappingWarning[source]#

Bases: MappingWarning

A user-defined mapping function did something strange.