resistics.errors module#

Module for custom resistics errors

resistics.errors.path_to_string(path: Path) str[source]#

Convert a path to a string in a OS agnostic way

Parameters:

path (Path) – The path to convert

Returns:

A string for the path

Return type:

str

exception resistics.errors.PathError(path: Path)[source]#

Bases: Exception

Use for a general error with paths

exception resistics.errors.PathNotFoundError(path: Path)[source]#

Bases: PathError

Use if path does not exist

exception resistics.errors.NotFileError(path: Path)[source]#

Bases: PathError

Use if expected a file and got a directory

exception resistics.errors.NotDirectoryError(path: Path)[source]#

Bases: PathError

Use if expected a directory and got a file

exception resistics.errors.WriteError(path: Path, message: str = '')[source]#

Bases: Exception

exception resistics.errors.ReadError(path: Path, message: str = '')[source]#

Bases: Exception

exception resistics.errors.MetadataReadError(path: Path, message: str | None = None)[source]#

Bases: Exception

Use when failed to read a metadata

exception resistics.errors.ProjectPathError(project_dir: Path, message: str)[source]#

Bases: Exception

Use for a general error with a project path

exception resistics.errors.ProjectCreateError(project_dir: Path, message: str)[source]#

Bases: ProjectPathError

Use if encounter an error creating a project

exception resistics.errors.ProjectLoadError(project_dir: Path, message: str)[source]#

Bases: ProjectPathError

Use if error on project load

exception resistics.errors.MeasurementNotFoundError(site_name: str, meas_name: str)[source]#

Bases: Exception

Use if unable to find a measurement

exception resistics.errors.SiteNotFoundError(site_name: str)[source]#

Bases: Exception

Use if unable to find a site

exception resistics.errors.TimeDataReadError(dir_path: Path, message: str)[source]#

Bases: Exception

Use when encounter an error reading time series data

exception resistics.errors.ChannelNotFoundError(chan: str, chans: Collection[str])[source]#

Bases: Exception

Use when a channel is not found

exception resistics.errors.CalibrationFileNotFound(dir_path: Path, file_paths: Path | List[Path], message: str = '')[source]#

Bases: Exception

Use when calibration files are not found

exception resistics.errors.CalibrationFileReadError(calibration_path: Path, message: str = '')[source]#

Bases: Exception

Use if encounter an error reading a calibration file

exception resistics.errors.ProcessRunError(process: str, message: str)[source]#

Bases: Exception

Use when a error is encountered during a process run