id_translation.fetching.exceptions#

Errors and warnings related to fetching.

Exceptions

CacheAccessNotAvailableError

Raised when calling AbstractFetcher.cache_access on an instance that is not cached.

DuplicateSourceError

Multiple translations for the same source received.

DuplicateSourceWarning

Duplicate sources detected.

FetcherError

Base class for Fetcher exceptions.

FetcherWarning

Base class for Fetcher warnings.

ForbiddenOperationError(operation, reason)

Exception indicating that the Fetcher does not support an operation.

ImplementationError

An underlying implementation did something wrong.

UnknownIdError

Caller requested unknown id(s).

UnknownPlaceholderError

Caller requested unknown placeholder name(s).

UnknownSourceError(unknown_sources, sources)

Caller requested unknown source(s).

exception CacheAccessNotAvailableError[source]#

Bases: FetcherError

Raised when calling AbstractFetcher.cache_access on an instance that is not cached.

exception DuplicateSourceError[source]#

Bases: FetcherError

Multiple translations for the same source received.

exception DuplicateSourceWarning[source]#

Bases: FetcherWarning

Duplicate sources detected.

exception FetcherError[source]#

Bases: RuntimeError

Base class for Fetcher exceptions.

exception FetcherWarning[source]#

Bases: RuntimeWarning

Base class for Fetcher warnings.

exception ForbiddenOperationError(operation, reason)[source]#

Bases: FetcherError

Exception indicating that the Fetcher does not support an operation.

exception ImplementationError[source]#

Bases: FetcherError

An underlying implementation did something wrong.

exception UnknownIdError[source]#

Bases: FetcherError

Caller requested unknown id(s).

exception UnknownPlaceholderError[source]#

Bases: FetcherError

Caller requested unknown placeholder name(s).

exception UnknownSourceError(unknown_sources, sources, msg='Sources {unknown_sources} not recognized. Known sources: {sources}.')[source]#

Bases: FetcherError

Caller requested unknown source(s).

Parameters:
  • unknown_sources – The sources which are not known to the Fetcher.

  • sources – Sources known to the fetcher.

  • msg – A format string that takes unknown_sources and sources.