Skip to content

Exceptions Reference

view.exceptions

__all__ = ('ViewWarning', 'NotLoadedWarning', 'ViewError', 'BadEnvironmentError', 'InvalidBodyError', 'MistakeError', 'LoaderWarning', 'AppNotFoundError', 'DatabaseError', 'InvalidDatabaseSchemaError', 'DuplicateRouteError', 'InvalidRouteError', 'ViewInternalError', 'ConfigurationError', 'NeedsDependencyError', 'InvalidTemplateError', 'TypeValidationError', 'BuildWarning', 'BuildError', 'MissingRequirementError', 'InvalidResultError', 'UnknownBuildStepError', 'PlatformNotSupportedError', 'WebSocketError', 'WebSocketExpectError', 'WebSocketHandshakeError', 'InvalidCustomLoaderError') module-attribute

AppNotFoundError

Bases: ViewError, FileNotFoundError

Couldn't find the app from the given path.

BadEnvironmentError

Bases: ViewError

An environment variable is missing.

BuildError

Bases: ViewError

Build failed.

BuildWarning

Bases: ViewWarning

Warning issued during building.

ConfigurationError

Bases: ViewError

Something is wrong with the configuration.

DatabaseError

Bases: ViewError

Database error.

DuplicateRouteError

Bases: ViewError

Duplicate routes in loader.

InvalidBodyError

Bases: ViewError

The specified type cannot be used as a view body.

InvalidCustomLoaderError

Bases: ViewError

Custom loader is invalid.

InvalidDatabaseSchemaError

Bases: DatabaseError

Database schema is invalid.

InvalidResultError

Bases: ViewError, TypeError

Invalid route result.

InvalidRouteError

Bases: ViewError

Something is wrong with a route.

InvalidTemplateError

Bases: ViewError

Something is wrong with a template.

LoaderWarning

Bases: ViewWarning

A warning from the loader.

MissingRequirementError

Bases: BuildError

Build requirement is missing.

MistakeError

Bases: ViewError

The user made a mistake.

NeedsDependencyError

Bases: ViewError

View needs a dependency that wasn't installed.

NotLoadedWarning

Bases: ViewWarning

load() was never called

PlatformNotSupportedError

Bases: BuildError

Build step does not support the platform.

TypeValidationError

Bases: TypeError, ViewError

Could not assign the object to the target type.

UnknownBuildStepError

Bases: BuildError

Undefined build step was used.

ViewError

Bases: Exception

Base class for exceptions in view.py

hint = hint instance-attribute

__init__(*args: object, hint: RenderableType | None = None) -> None

ViewInternalError

Bases: ViewError

Something was wrong internally.

ViewWarning

Bases: UserWarning

Base class for all warnings in view.py

WebSocketError

Bases: ViewError

Something related to a WebSocket failed.

WebSocketExpectError

Bases: WebSocketError, AssertionError, TypeError

WebSocket received unexpected message.

WebSocketHandshakeError

Bases: WebSocketError

WebSocket handshake went wrong somehow.