iota2.common.service_error

Module defining different exception classes for iota2

Classes

Path(*args, **kwargs)

PurePath subclass that can make system calls.

Exceptions

ConfigError(msg)

Exception raised for configuration errors in the configuration file (like incompatible parameters) IN : msg [string] : explanation of the error

ConfigFileError(msg)

Base subclass for exception in the configuration file IN : msg [string] : explanation of the error

ContainsMultipolygon(msg)

Raise if a shapefile contains at least one multipolygon

DataBaseError(msg)

Base subclass for exception in a database (SQLITE, shapefile)

DirError(directory)

Exception raised for errors in mandatory directory IN : directory [string] : name of the directory

DirectoryError(directory_path)

Base subclass for exception in the configuration file IN : msg [string] : explanation of the error

DuplicatedFeatures(msg)

Raise if a shapefile contains duplicated features

EmptyFeatures(msg)

Raise if a shapefile contains empty features

EmptyGeometry(msg)

Raise if a shapefile contains empty geometries

FeaturesShapeError(shape)

Raise if output features are not 2D or 3D

FieldType(input_vector, data_field, ...)

Raise if a shapefile's field is of the wrong type.

FileError(msg)

Exception raised for errors inside an input file (like a bad format or absence of a variable) IN : msg [string] : explanation of the error

I2error(msg)

Base class for exceptions in iota2 chain

IntersectionError()

Base subclass for exception in the configuration file IN : msg [string] : explanation of the error

InvalidGeometry(msg)

Raise if a geometry in a shapefile is invalid

InvalidProjection(msg)

Raise if the provided projection isn't valid (None, not the expected one ...)

MissingField(database_path, missing_field)

Raise if a field is missing in a shapefile

NamingConvention(msg)

Raise if a file's name doesn't follow a specific convention

NeuralNetworkConstructorError(expected_args, ...)

Raise if NN constructor arguments not the expected ones.

SqliteCorrupted(journalsqlite_path)

Raise if an SQLITE file is corrupted

TooManyColumnsError()

Exceptions thrown when the number of columns inside the learning samples file is too high.

TooSmallRegion(input_vector, area_threshold, ...)

Raise if some regions are too small

exception iota2.common.service_error.ConfigError(msg)[source]

Exception raised for configuration errors in the configuration file (like incompatible parameters) IN :

msg [string] : explanation of the error

__init__(msg)[source]
exception iota2.common.service_error.ConfigFileError(msg)[source]

Base subclass for exception in the configuration file IN :

msg [string] : explanation of the error

__init__(msg)[source]
exception iota2.common.service_error.ContainsMultipolygon(msg)[source]

Raise if a shapefile contains at least one multipolygon

__init__(msg)[source]
exception iota2.common.service_error.DataBaseError(msg)[source]

Base subclass for exception in a database (SQLITE, shapefile)

__init__(msg)[source]
exception iota2.common.service_error.DirError(directory)[source]

Exception raised for errors in mandatory directory IN :

directory [string] : name of the directory

__init__(directory)[source]
exception iota2.common.service_error.DirectoryError(directory_path)[source]

Base subclass for exception in the configuration file IN :

msg [string] : explanation of the error

__init__(directory_path)[source]
exception iota2.common.service_error.DuplicatedFeatures(msg)[source]

Raise if a shapefile contains duplicated features

__init__(msg)[source]
exception iota2.common.service_error.EmptyFeatures(msg)[source]

Raise if a shapefile contains empty features

__init__(msg)[source]
exception iota2.common.service_error.EmptyGeometry(msg)[source]

Raise if a shapefile contains empty geometries

__init__(msg)[source]
exception iota2.common.service_error.FeaturesShapeError(shape)[source]

Raise if output features are not 2D or 3D

__init__(shape)[source]
exception iota2.common.service_error.FieldType(input_vector, data_field, expected_type)[source]

Raise if a shapefile’s field is of the wrong type.

Parameters:
  • input_vector (Path | str) – Shapefile path

  • data_field (str) – Current field type

  • expected_type (type) – Expected field type

__init__(input_vector, data_field, expected_type)[source]
exception iota2.common.service_error.FileError(msg)[source]

Exception raised for errors inside an input file (like a bad format or absence of a variable) IN :

msg [string] : explanation of the error

__init__(msg)[source]
exception iota2.common.service_error.I2error(msg)[source]

Base class for exceptions in iota2 chain

__init__(msg)[source]
exception iota2.common.service_error.IntersectionError[source]

Base subclass for exception in the configuration file IN :

msg [string] : explanation of the error

__init__()[source]
exception iota2.common.service_error.InvalidGeometry(msg)[source]

Raise if a geometry in a shapefile is invalid

__init__(msg)[source]
exception iota2.common.service_error.InvalidProjection(msg)[source]

Raise if the provided projection isn’t valid (None, not the expected one …)

__init__(msg)[source]
exception iota2.common.service_error.MissingField(database_path, missing_field)[source]

Raise if a field is missing in a shapefile

Parameters:
  • database_path (Path | str) – Database path

  • missing_field (str) – Missing field

__init__(database_path, missing_field)[source]
exception iota2.common.service_error.NamingConvention(msg)[source]

Raise if a file’s name doesn’t follow a specific convention

__init__(msg)[source]
exception iota2.common.service_error.NeuralNetworkConstructorError(expected_args, current_args)[source]

Raise if NN constructor arguments not the expected ones.

Parameters:
  • expected_args (list[str]) – Expected arguments

  • current_args (list[str]) – Current (wrong) arguments

__init__(expected_args, current_args)[source]
exception iota2.common.service_error.SqliteCorrupted(journalsqlite_path)[source]

Raise if an SQLITE file is corrupted

__init__(journalsqlite_path)[source]
exception iota2.common.service_error.TooManyColumnsError[source]

Exceptions thrown when the number of columns inside the learning samples file is too high.

__init__()[source]
exception iota2.common.service_error.TooSmallRegion(input_vector, area_threshold, nb_too_small_geoms)[source]

Raise if some regions are too small

Parameters:
  • input_vector (Path | str) – Input shapefile

  • area_threshold (float) – Fixed threshold for regions’ area

  • nb_too_small_geoms (int) – Number of regions that are smaller than the threshold

__init__(input_vector, area_threshold, nb_too_small_geoms)[source]