comicbox.exceptions ¶
Exceptions for comicbox.
Every operational error comicbox raises on a public path derives from :class:ComicboxError, so library consumers can write except ComicboxError without also swallowing unrelated programming errors (ValueError, KeyError, …) from their own code.
This module is a leaf: it must not import anything from comicbox, so any module (including the format packages and the box mixins) can import it without load-order concerns. The write/online modules re-export their exceptions from here under their historical import paths.
ArchiveError ¶
Bases: ComicboxError
An archive could not be opened or read.
Source code in comicbox/exceptions.py
36 37 | |
ArchiveWriteError ¶
Bases: ArchiveError
An archive could not be written, repacked, or renamed.
Source code in comicbox/exceptions.py
40 41 | |
ComicNotFoundError ¶
Bases: ComicboxError, FileNotFoundError
A comic path names nothing on disk.
Also a FileNotFoundError, which is what this raised before this class existed, so callers catching that keep working.
Source code in comicbox/exceptions.py
111 112 113 114 115 116 117 | |
ComicboxError ¶
Bases: Exception
Base class for all operational errors comicbox raises.
Source code in comicbox/exceptions.py
28 29 | |
ConfigurationError ¶
Bases: ComicboxError, ValueError
A config file, env var, or argument holds a value comicbox rejects.
Also a ValueError, which is what these sites raised before this class existed, so callers catching that keep working.
Source code in comicbox/exceptions.py
102 103 104 105 106 107 108 | |
DestinationOccupiedError ¶
Bases: ArchiveWriteError
A write’s destination path is held by another file or writer.
kind says which collision: "convert" – the CBZ this archive would repack to already exists (or another archive in the same batch claims it, in which case occupant names it); "rename" – the predicted filename is taken; "inflight" – another writer in this process holds the destination right now (transient; retry later).
Source code in comicbox/exceptions.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | |
__init__(source, destination, kind, occupant=None) ¶
Record the two paths, the collision kind, and any rival source.
Source code in comicbox/exceptions.py
67 68 69 70 71 72 73 74 75 76 77 78 79 | |
__reduce__() ¶
Rebuild with the real signature when crossing a process boundary.
Python unpickles an exception as cls(*self.args), which here is cls(message) – a TypeError that would replace the real error with a bogus one on the far side. WriteResult.error is a public field, so keep it picklable.
Source code in comicbox/exceptions.py
89 90 91 92 93 94 95 96 97 98 99 | |
ExportError ¶
Bases: ComicboxError
A metadata file export failed its preconditions.
Source code in comicbox/exceptions.py
124 125 | |
MetadataError ¶
Bases: ComicboxError
Metadata could not be loaded or routed through the source pipeline.
Source code in comicbox/exceptions.py
120 121 | |
OnlineConfigurationError ¶
Bases: ComicboxError
Raised when OnlineSession inputs are inconsistent or incomplete.
Source code in comicbox/exceptions.py
132 133 | |
OnlineLookupAbortedError ¶
Bases: ComicboxError
Raised when the selector callback returns (‘abort’, None).
Source code in comicbox/exceptions.py
136 137 | |
ReadingListError ¶
Bases: ComicboxError
A reading list could not be read, converted, combined or written.
Source code in comicbox/exceptions.py
140 141 | |
ReadingListFetchError ¶
Bases: ReadingListError
A reading list could not be fetched.
A network failure, an HTTP error, a refused URL, a download over the size cap, or a missing credential. A cancel, or a spent quota, raises OnlineLookupAbortedError instead, as tagging does.
Source code in comicbox/exceptions.py
157 158 159 160 161 162 163 164 | |
ReadingListFormatError ¶
Bases: ReadingListError
A document is not a reading list in any format comicbox reads.
Source code in comicbox/exceptions.py
144 145 | |
SmartListError ¶
Bases: ReadingListFormatError
A ComicRack smart list.
Its <Matchers> are rules that select comics from a library, not a list of issues, so there is nothing to read.
Source code in comicbox/exceptions.py
148 149 150 151 152 153 154 | |
UnparsedTagFileError ¶
Bases: ArchiveWriteError
A keep write refused: a tag file the comic carries did not parse.
Source code in comicbox/exceptions.py
44 45 | |
UnsafePdfAttachmentError ¶
Bases: ArchiveWriteError
A PDF write refused: replacing its tag files would harm another attachment.
Source code in comicbox/exceptions.py
52 53 | |
UnsupportedArchiveTypeError ¶
Bases: ComicboxError
Unsupported Archive Type.
Source code in comicbox/exceptions.py
32 33 | |
UnwritableFormatError ¶
Bases: ArchiveWriteError
A write refused: -w names no format this archive can hold.
Source code in comicbox/exceptions.py
48 49 | |
WriteValidationError ¶
Bases: ComicboxError
Raised when write_metadata inputs are inconsistent or invalid.
Source code in comicbox/exceptions.py
128 129 | |