Errors and Exceptions

python-webuntis tries to cover as many error codes recieved by the API as possible.

exception webuntis.errors.Error

Bases: exceptions.Exception

Superclass for all python-webuntis-specific errors, never gets raised directly.

exception webuntis.errors.RemoteError

Bases: webuntis.errors.Error, exceptions.IOError

There was some kind of error while interacting with the server.

request = None

The decoded JSON request which lead to this error, if available.

result = None

The decoded JSON response/result which lead to this error, if available.

code = None

The error code, if available.

exception webuntis.errors.MethodNotFoundError

Bases: webuntis.errors.RemoteError

The JSON-RPC method was not found. This really should not occur.

exception webuntis.errors.AuthError

Bases: webuntis.errors.RemoteError

Errors while logging in.

exception webuntis.errors.BadCredentialsError

Bases: webuntis.errors.AuthError, exceptions.ValueError

Invalid or missing username or password.

exception webuntis.errors.NotLoggedInError

Bases: webuntis.errors.AuthError

The session expired or we never logged in.

exception webuntis.errors.DateNotAllowed

Bases: webuntis.errors.RemoteError

The selected date range (for timetable) is not allowed.