upsies.errors
Exception classes
Abstraction layers should raise one of these exceptions if an error message
should be displayed to the user. If the programmer made a mistake, any
appropriate builtin exception (e.g. ValueError, TypeError) or
RuntimeError should be raised.
For example, get() always raises RequestError,
regardless of which library is used or what went wrong, except when something
like caching fails, which is most likely due to a bug.
Functions
- upsies.errors.DaemonProcessError(exception, original_traceback)[source]
Exception from a
DaemonProcesstargetThis exception has an original_traceback attribute that provides the trace of the exception.
Exceptions
- exception upsies.errors.AnnounceUrlNotSetError(*_, tracker)[source]
Announce URL is required but not provided by the user
- exception upsies.errors.BannedGroup(group, additional_info=None)[source]
Raised by
BannedGroup.check()if release group is banned
- exception upsies.errors.ConfigError[source]
Error while reading/writing config file or setting config file option
- exception upsies.errors.ConfigValueError(message, *, path=())[source]
Configuration option is set to an invalid value
- exception upsies.errors.ContentError[source]
Something is wrong with user-provided content, e.g. no video files in the given directory or no permission to read
- exception upsies.errors.DaemonProcessTerminated[source]
Raised by a
DaemonProcesstarget if it receivedterminate
- exception upsies.errors.FoundDupeError(filenames)[source]
Tried to upload files that have already been uploaded
- Parameters:
filenames – Sequence of file names that have already been uploaded
- exception upsies.errors.RequestError(msg, url='', headers={}, status_code=None, text='')[source]
Network request failed
- exception upsies.errors.RequestedNotFoundError(requested)[source]
Something was requested and not found
This is different from a
RequestErrorthat was raised because the service is down, authentication failed, etc.- Parameters:
requested – Human-readable representation of the requested thing.
- exception upsies.errors.RuleBroken(reason)[source]
Raised by
TrackerRuleBase.check()if a rule is broken
- exception upsies.errors.SceneAbbreviatedFilenameError(file_name)[source]
An abbreviated scene file name (e.g. foo-bar.mkv) was provided
These contain almost no information and should always be provided via a properly named parent directory.
- exception upsies.errors.SceneFileSizeError(filename, *, original_size, existing_size)[source]
Scene release file size differs from original release
- exception upsies.errors.SceneMissingInfoError(file_name)[source]
Missing information about a file from a scene release
- exception upsies.errors.SceneRenamedError(*, original_name, existing_name)[source]
Renamed scene release
- exception upsies.errors.TfaRequired[source]
Raised by
TrackerBase._login()if 2FA one-time password is required
- exception upsies.errors.TimeoutError(seconds, *, resource=None)[source]
Raised when something took too long
- Parameters:
seconds – How many seconds we waited before giving up
resource – What we were waiting for (e.g. URL)
- exception upsies.errors.UiError[source]
Fatal user interface error that cannot be handled by the UI itself
- exception upsies.errors.UnknownConfigError(name)[source]
Unknown section, subsection or option accessed
Because this exception is raised in
__getitem__methods, it is a subclass ofKeyError. That means the error message is quoted because it is supposed to be a key. An actual error message is available via themessageattribute. Likewise, the section, subsection or option name is available asname.
- exception upsies.errors.UnknownOptionConfigError(option_name)[source]
Unknown option accessed (see
UnknownConfigError)
- exception upsies.errors.UnknownSectionConfigError(section_name)[source]
Unknown section accessed (see
UnknownConfigError)
- exception upsies.errors.UnknownSubsectionConfigError(subsection_name)[source]
Unknown subsection accessed (see
UnknownConfigError)