mapteksdk.geologycore.errors module
Special errors raised in this module.
- exception DatabaseVersionNotSupportedError(expected_version, current_version)
Bases:
Exception
Error raised when opening a drillhole database which is too new.
Drillhole database objects have an internal version. This error is raised if this version indicates that the Python SDK does not know how to read the database.
- Parameters
expected_version (int) – The expected database version.
current_version (int) – The actual database version.
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception DatabaseLoadError
Bases:
Exception
Error raised if the SDK fails to read a drillhole database
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception OrphanDrillholeError(drillhole_id)
Bases:
Exception
Exception raised when attempting to read an orphaned drillhole.
Alternatively, a drillhole is considered orphaned between when it is created and when the database which contains it is closed.
- Parameters
drillhole_id (str) – The id of the orphaned drillhole.
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception TableNotFoundError(table)
Bases:
Exception
Error raised when a table could not be found.
- Parameters
table (str | DrillholeTableType) – The name or type of the table which was not found.
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception TooManyTablesError(table_type, expected_count, actual_count)
Bases:
Exception
Error raised when multiple tables were found.
- Parameters
table_type (DrillholeTableType) – The type of the table.
expected_count (int) – The expected number of tables with the specified type.
actual_count (int) – The actual number of tables with the specified type.
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception TooManyTablesWarning(table_type, expected_count, actual_count)
Bases:
Warning
Warning given when too many tables were found.
- Parameters
table_type (DrillholeTableType) – String representation of the table type which triggered the warning.
expected_count (int) – The expected number of tables.
actual_count (int) – The actual number of tables.
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception FieldNotFoundError(field)
Bases:
Exception
Error raised when a field could not be found.
- Parameters
field (str | DrillholeFieldType) – The name or type of the field which was not found.
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception TooManyFieldsError(field_type, expected_count, actual_count)
Bases:
Exception
Error raised when multiple fields were found.
- Parameters
field_type (str | DrillholeFieldType) – String representation of the field type which triggered the error.
expected_count (int) – The expected number of fields.
actual_count (int) – The actual number of fields.
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception TooManyFieldsWarning(field_type, expected_count, actual_count)
Bases:
Warning
Warning given when too many fields were found.
- Parameters
field_type (str | DrillholeFieldType) – String representation of the field type which triggered the warning.
expected_count (int) – The expected number of fields.
actual_count (int) – The actual number of fields.
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception TableMismatchError(field, expected_table)
Bases:
Exception
Error raised when attempting to use a field from a different table.
- Parameters
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception FieldTypeNotSupportedError(field_type, table_type)
Bases:
Exception
Error raised when attempting to add an unsupported field to a table.
- Parameters
field_type (DrillholeFieldType) – The unsupported field type.
table_type (DrillholeTableType) – The type of table which does not support the field type.
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception DataTypeNotSupportedError(field_type, data_type)
Bases:
Exception
Error raised when attempting to add a field with an unsupported data type.
- Parameters
field_type (DrillholeFieldType) – The unsupported field type.
data_type (type) – The type of data which is not supported.
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception UnitNotSupportedError(field_type, unit)
Bases:
Exception
Error raised when a unit is not supported.
- Parameters
field_type (DrillholeFieldType) –
unit (Any) –
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception FieldDoesNotSupportUnitsError(field_type)
Bases:
Exception
Error raised when a field does not support units.
This indicates that the data stored in the field has no unit, but the caller attempted to give the field a unit.
- Parameters
field_type (DrillholeFieldType) –
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception DuplicateFieldTypeError(field_type, table_name)
Bases:
Exception
Error raised when adding a field which already exists to a table.
- Parameters
field_type (DrillholeFieldType) – The type of field which has been duplicated.
table_name (str) – The name of the table the field was intended to be added to.
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception DuplicateFieldNameError(field_name)
Bases:
Exception
Error raised when adding a field with the same name as an existing field.
- Parameters
field_name (str) – The name of the duplicate field.
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception EmptyTableError(table_name)
Bases:
Exception
Error raised when a table with no fields is saved.
- Parameters
table_name (str) – The name of the table with no fields.
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception MissingRequiredFieldsError(table, missing_fields, all_fields_required)
Bases:
Exception
Error raised when a table does not contain sufficient required fields.
- Parameters
table (BaseTableInformation) – The name which is missing fields.
missing_fields (list[DrillholeFieldType]) – List of required field types which are missing.
all_fields_required (bool) – If True, then all required fields are required to make the table valid. If False, then only one of the required fields is needed to make the table valid.
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception DuplicateTableTypeError(table_type)
Bases:
Exception
Error raised when adding a duplicate table.
This is raised when attempting to add a second collar or survey table to a drillhole database. Those table types do not support duplicates.
- Parameters
table_type (DrillholeTableType) – The type of the duplicate table.
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception DeletedFieldError(field)
Bases:
Exception
Error raised when attempting to use a field after it has been deleted.
- Parameters
field (FieldInformation) –
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.