Timenet.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 one or two
full sentences and raises the error again. str() adds the hint after the message as its own
sentence.
CatalogWarning ¶source
Bases: TimeNetWarning
A dataset listing skips a source without a catalog.
ConnectorCardWarning ¶source
Bases: TimeNetWarning
A dataset listing skips a dataset with an unreadable connector card.
FormatVersionSubject ¶source
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.
TimeFFormatVersionError ¶source
Bases: TimeFFormatError
A stored TimeF artifact has a format version that this TimeNet does not read.
Attributes:
| Name | Type | Description |
|---|---|---|
subject |
The versioned part of the release. |
|
where |
The file of the artifact, or a description of where a registry keeps it. |
|
found |
The version that the artifact records, older than |
|
oldest_readable |
The oldest version that this TimeNet reads. |
|
newest_readable |
The newest version that this TimeNet reads. |
|
path |
The file of the artifact, or |
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 |
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 release file is missing or differs from 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 relative file path, using the first missing or resized file in manifest order for local checks. |
|
expected |
What the manifest records, for example |
|
actual |
What the file holds, in the same form, or |
TimeNetInvalidCardError ¶source
Bases: TimeNetError, ValueError
A dataset card YAML is malformed or fails schema validation (raised while building).
TimeNetIsolationError ¶source
Bases: TimeNetBuildError
An isolated build cannot make its environment.
TimeNetManifestError ¶source
Bases: TimeFFormatError
A stored manifest is not a valid manifest.
Attributes:
| Name | Type | Description |
|---|---|---|
where |
The file of the manifest, or a description of where a registry keeps it. |
|
detail |
The first problem that the parser found. |
|
path |
The file of the manifest, or |
TimeNetMissingParentError ¶source
Bases: TimeNetDatasetNotFoundError
A required parent release or payload source is missing.
Attributes:
| Name | Type | Description |
|---|---|---|
missing |
The absent release. |
|
needed_by |
The release that needs it. |
|
payload_source |
|
|
searched |
The search location. |
TimeNetNoCatalogError ¶source
Bases: TimeNetRegistryError
No source of a dataset listing has a catalog.
TimeNetNotBuiltError ¶source
Bases: TimeNetDatasetNotFoundError
Only an installed connector provides a release, so it has no manifest yet.
Build the release to create its manifest, or read the connector's card for metadata.
Attributes:
| Name | Type | Description |
|---|---|---|
release |
The unbuilt release. |
|
card |
The connector's card of the release. |
TimeNetOriginError ¶source
Bases: TimeFFormatError
The provenance record of a release in the local registry is not valid.
Attributes:
| Name | Type | Description |
|---|---|---|
release |
The release of the record. |
|
path |
The file of the record. |
|
detail |
The first problem that the parser found. |
TimeNetRegistryError ¶source
Bases: TimeNetError
TimeNet could not load or reach a registry, or the registry could not serve a request.
TimeNetUnreachableError ¶source
Bases: TimeNetRegistryError
A request to a registry or its storage failed on the network.
TimeNetVersionConflictError ¶source
Bases: TimeNetError
A registry already holds a release with other files or another card than the copy.
A changed release needs a new version.
Attributes:
| Name | Type | Description |
|---|---|---|
release |
The release that differs. |
|
registry |
The destination registry, as text. |
|
registry_location |
The |
|
source |
The source registry, as text. |
|
difference |
What differs. |
|
needed_by |
The requested release that needs this payload source, or |
TimeNetVersionUnavailableError ¶source
Bases: TimeNetDatasetNotFoundError, TimeFValidationError
The installed connector cannot build the requested dataset version.
Attributes:
| Name | Type | Description |
|---|---|---|
release |
The requested release. |
|
declared |
The version that the connector builds. |
TimeNetWarning ¶source
Bases: UserWarning
Base class for all TimeNet warnings.