Exceptions¶
Exceptions
CellPatternError (value) |
Raised if FieldPattern was passed an invalid cellpatterns argument. |
FuzzyTableError |
Standard fuzzytable exception |
InvalidFieldError (fields) |
Raised in either of these cases: |
InvalidFileError (path) |
Raised if FuzzyTable was passed a path that it cannot handle. |
InvalidRatioError (min_ratio) |
Raised if FuzzyTable was passed an invalid min_ratio argument. |
InvalidRowError (row_num) |
Raised if FuzzyTable was passed an invalid header_row argument. |
InvalidSeekError (header_seek_param) |
Raised if FuzzyTable was passed an invalid header_seek argument. |
MissingFieldError (missingfieldnames[, …]) |
Raised if the following are true: - at least one desired field was passed to FuzzyTable - FuzzyTable missingfielderror_active was set to True. |
ModeError (mode) |
Raised if a CellPattern was passed an invalid mode argument. |
SheetnameError (path, sheetname) |
Raised if an excel workbook is missing the sheetname worksheet. |
UninstantiatededCellPatternError (…) |
Some cell patterns must be instantiated prior to passing to a FieldPattern. |
-
exception
fuzzytable.exceptions.
CellPatternError
(value)¶ Bases:
fuzzytable.exceptions.FuzzyTableError
,TypeError
Raised if FieldPattern was passed an invalid
cellpatterns
argument.- Valid cellpattern arguments include:
- a subclass of CellPattern or an instance thereof
- any callable
- a sequence of the above
-
exception
fuzzytable.exceptions.
FuzzyTableError
¶ Bases:
Exception
Standard fuzzytable exception
-
exception
fuzzytable.exceptions.
InvalidFieldError
(fields)¶ Bases:
fuzzytable.exceptions.FuzzyTableError
Raised in either of these cases:
- Scenario 1:
- FuzzyTable
header_row_seek
is True - FuzzyTable
fields
parameter is empty
- FuzzyTable
- Scenario 2:
- FuzzyTable was passed an invalid
fields
argument.
- FuzzyTable was passed an invalid
- Valid
fields
arguments: - string
- FieldPattern instance
- sequence of the above (in combination also acceptable)
-
exception
fuzzytable.exceptions.
InvalidFileError
(path)¶ Bases:
fuzzytable.exceptions.FuzzyTableError
Raised if FuzzyTable was passed a
path
that it cannot handle.
-
exception
fuzzytable.exceptions.
InvalidRatioError
(min_ratio)¶ Bases:
fuzzytable.exceptions.FuzzyTableError
Raised if FuzzyTable was passed an invalid
min_ratio
argument.min_ratio
must be a float between 0 and 1.
-
exception
fuzzytable.exceptions.
InvalidRowError
(row_num)¶ Bases:
fuzzytable.exceptions.FuzzyTableError
,LookupError
Raised if FuzzyTable was passed an invalid
header_row
argument.- Valid
header_row
arguments include: - None
- positive (non-zero) integer
- Valid
-
exception
fuzzytable.exceptions.
InvalidSeekError
(header_seek_param)¶ Bases:
fuzzytable.exceptions.FuzzyTableError
,TypeError
Raised if FuzzyTable was passed an invalid
header_seek
argument.- Valid
header_seek
arguments: - boolean
- positive (non-zero) integer
- Valid
-
exception
fuzzytable.exceptions.
MissingFieldError
(missingfieldnames, fuzzytablename=None)¶ Bases:
fuzzytable.exceptions.FuzzyTableError
- Raised if the following are true:
- at least one desired field was passed to FuzzyTable
- FuzzyTable missingfielderror_active was set to True.
- one or more of the desired fields wasn’t found
-
exception
fuzzytable.exceptions.
ModeError
(mode)¶ Bases:
fuzzytable.exceptions.FuzzyTableError
Raised if a CellPattern was passed an invalid
mode
argument.- Valid cellpattern
mode
arguments are: exact
approx
contains
- Valid cellpattern
-
exception
fuzzytable.exceptions.
SheetnameError
(path, sheetname)¶ Bases:
fuzzytable.exceptions.FuzzyTableError
,KeyError
Raised if an excel workbook is missing the
sheetname
worksheet.
-
exception
fuzzytable.exceptions.
UninstantiatededCellPatternError
(cellpattern_class)¶ Bases:
fuzzytable.exceptions.FuzzyTableError
Some cell patterns must be instantiated prior to passing to a FieldPattern.