Exceptions

exception qbittorrentapi.exceptions.APIError

Bases: Exception

Base error for all exceptions from this Client.

exception qbittorrentapi.exceptions.FileError

Bases: OSError, qbittorrentapi.exceptions.APIError

Base class for all exceptions for file handling.

exception qbittorrentapi.exceptions.TorrentFileError

Bases: qbittorrentapi.exceptions.FileError

Base class for all exceptions for torrent files.

exception qbittorrentapi.exceptions.TorrentFileNotFoundError

Bases: qbittorrentapi.exceptions.TorrentFileError

Specified torrent file does not appear to exist.

exception qbittorrentapi.exceptions.TorrentFilePermissionError

Bases: qbittorrentapi.exceptions.TorrentFileError

Permission was denied to read the specified torrent file.

exception qbittorrentapi.exceptions.APIConnectionError(*args, **kwargs)

Bases: requests.exceptions.RequestException, qbittorrentapi.exceptions.APIError

Base class for all communications errors including HTTP errors.

exception qbittorrentapi.exceptions.LoginFailed(*args, **kwargs)

Bases: qbittorrentapi.exceptions.APIConnectionError

This can technically be raised with any request since log in may be attempted for any request and could fail.

exception qbittorrentapi.exceptions.HTTPError(*args, **kwargs)

Bases: requests.exceptions.HTTPError, qbittorrentapi.exceptions.APIConnectionError

Base error for all HTTP errors. All errors following a successful connection to qBittorrent are returned as HTTP statuses.

exception qbittorrentapi.exceptions.HTTP4XXError(*args, **kwargs)

Bases: qbittorrentapi.exceptions.HTTPError

Base error for all HTTP 4XX statuses.

exception qbittorrentapi.exceptions.HTTP5XXError(*args, **kwargs)

Bases: qbittorrentapi.exceptions.HTTPError

Base error for all HTTP 5XX statuses.

exception qbittorrentapi.exceptions.HTTP400Error(*args, **kwargs)

Bases: qbittorrentapi.exceptions.HTTP4XXError

HTTP 400 Status

exception qbittorrentapi.exceptions.HTTP401Error(*args, **kwargs)

Bases: qbittorrentapi.exceptions.HTTP4XXError

HTTP 401 Status

exception qbittorrentapi.exceptions.HTTP403Error(*args, **kwargs)

Bases: qbittorrentapi.exceptions.HTTP4XXError

HTTP 403 Status

exception qbittorrentapi.exceptions.HTTP404Error(*args, **kwargs)

Bases: qbittorrentapi.exceptions.HTTP4XXError

HTTP 404 Status

exception qbittorrentapi.exceptions.HTTP409Error(*args, **kwargs)

Bases: qbittorrentapi.exceptions.HTTP4XXError

HTTP 409 Status

exception qbittorrentapi.exceptions.HTTP415Error(*args, **kwargs)

Bases: qbittorrentapi.exceptions.HTTP4XXError

HTTP 415 Status

exception qbittorrentapi.exceptions.HTTP500Error(*args, **kwargs)

Bases: qbittorrentapi.exceptions.HTTP5XXError

HTTP 500 Status

exception qbittorrentapi.exceptions.MissingRequiredParameters400Error(*args, **kwargs)

Bases: qbittorrentapi.exceptions.HTTP400Error

Endpoint call is missing one or more required parameters.

exception qbittorrentapi.exceptions.InvalidRequest400Error(*args, **kwargs)

Bases: qbittorrentapi.exceptions.HTTP400Error

One or more endpoint arguments are malformed.

exception qbittorrentapi.exceptions.Unauthorized401Error(*args, **kwargs)

Bases: qbittorrentapi.exceptions.HTTP401Error

Primarily reserved for XSS and host header issues.

exception qbittorrentapi.exceptions.Forbidden403Error(*args, **kwargs)

Bases: qbittorrentapi.exceptions.HTTP403Error

Not logged in, IP has been banned, or calling an API method that isn’t public.

exception qbittorrentapi.exceptions.NotFound404Error(*args, **kwargs)

Bases: qbittorrentapi.exceptions.HTTP404Error

This should mean qBittorrent couldn’t find a torrent for the torrent hash.

exception qbittorrentapi.exceptions.Conflict409Error(*args, **kwargs)

Bases: qbittorrentapi.exceptions.HTTP409Error

Returned if arguments don’t make sense specific to the endpoint.

exception qbittorrentapi.exceptions.UnsupportedMediaType415Error(*args, **kwargs)

Bases: qbittorrentapi.exceptions.HTTP415Error

torrents/add endpoint will return this for invalid URL(s) or files.

exception qbittorrentapi.exceptions.InternalServerError500Error(*args, **kwargs)

Bases: qbittorrentapi.exceptions.HTTP500Error

Returned if qBittorent craps on itself while processing the request…