Errors
timenet.errors ¶source
TimeNet's exception hierarchy, and the warnings it raises.
Every TimeNet-raised error derives from :class:TimeNetError. TimeF validation errors also derive
from :class:ValueError, so existing except ValueError handlers keep working. TimeNet raises
the builtin FileNotFoundError and FileExistsError directly for user-supplied paths.
Every TimeNet-raised warning derives from :class:TimeNetWarning.
Some errors carry facts as attributes and leave the remedy to the front end that called the lower
layer: the CLI names its flags, the SDK names its keywords. A front end sets hint to a full
sentence and raises the error again. The message ends with a period, and the hint follows as its own
sentence.
SpanOutsideWindowWarning ¶source
Bases: TimeNetWarning
An annotation's span falls outside the window of the series it names, and is kept.
TimeFEditError ¶source
Bases: TimeFValidationError
An edit would leave a dataset referentially inconsistent (for example, a dangling reference).
TimeFFormatError ¶source
Bases: TimeNetError
An on-disk TimeF artifact is corrupt or uses an unsupported format version.
TimeFNotFoundError ¶source
Bases: TimeFValidationError, LookupError
An ID, parent alias, or parent release names nothing in the dataset, or the stored object has another kind.
TimeFNullValuesError ¶source
Bases: TimeFValidationError
Values contain nulls where the requested form, such as a NumPy array, cannot hold them.
TimeFReaderError ¶source
Bases: TimeNetError
A reader could not complete a read, e.g. its connection was closed while the read ran.
TimeFValidationError ¶source
Bases: TimeNetError, ValueError
A dataset or its arrays violate a TimeF invariant (raised while building or writing).
TimeNetAccessError ¶source
Bases: TimeNetError
A dataset needs credentialed or restricted access, so only the user's own registry may hold its data.
Attributes:
| Name | Type | Description |
|---|---|---|
dataset |
The release. |
|
access |
Its effective access level: the strictest level of its card and of the cards in its
lineage. See :func: |
|
requirements |
Each card, of the release itself or of an ancestor, whose access is not open,
with its access level and its |
|
hint |
str | None
|
What the caller can do instead, added by the front end, or |
TimeNetBuildError ¶source
Bases: TimeNetError
A build run failed: the connector build, or the environment it needed.
TimeNetConnectorError ¶source
Bases: TimeNetError
A connector found that one of its assumptions does not hold.
Connector code raises this error. For example, the source data has an unknown code, a download lacks a file, or a parent lacks a value that the connector needs. The message says where, such as the file and the row. TimeNet's own checks raise their own errors.
TimeNetDatasetNotFoundError ¶source
Bases: TimeNetError
A requested dataset id or version is not present in a registry or on disk.
TimeNetDownloadError ¶source
Bases: TimeNetConnectorError
TimeNet could not fetch a dataset's source data.
TimeNetFileError ¶source
Bases: TimeFFormatError
A file of a release is missing, or it does not match its manifest record.
A local copy is checked by file size. A transfer is checked by size and checksum.
Attributes:
| Name | Type | Description |
|---|---|---|
release |
The release that the file belongs to. |
|
owner |
The release, payload source, or transfer that the file belongs to, as text. |
|
path |
The file, relative to the release directory. For a local copy, this is the first missing or resized file in manifest order. |
|
expected |
What the manifest records, for example |
|
actual |
What the file holds, in the same form, or |
|
hint |
str | None
|
How the caller can get an intact copy, added by the front end, or |
TimeNetInvalidCardError ¶source
Bases: TimeNetError, ValueError
A dataset card YAML is malformed or fails schema validation (raised while building).
TimeNetMissingParentError ¶source
Bases: TimeNetDatasetNotFoundError
A release that another release needs is absent: a declared parent of a build, or a payload source.
Attributes:
| Name | Type | Description |
|---|---|---|
missing |
The absent release. |
|
needed_by |
The release that needs it. |
|
payload_source |
Whether |
|
searched |
Where the release was looked for. |
|
hint |
str | None
|
How the caller can obtain the release, added by the front end, or |
TimeNetRegistryError ¶source
Bases: TimeNetError
TimeNet could not load or reach a registry, or the registry could not serve a request.
TimeNetWarning ¶source
Bases: UserWarning
Base class for all TimeNet warnings.