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,TypeErrorRaised if FieldPattern was passed an invalid
cellpatternsargument.- Valid cellpattern arguments include:
- a subclass of CellPattern or an instance thereof
- any callable
- a sequence of the above
-
exception
fuzzytable.exceptions.FuzzyTableError¶ Bases:
ExceptionStandard fuzzytable exception
-
exception
fuzzytable.exceptions.InvalidFieldError(fields)¶ Bases:
fuzzytable.exceptions.FuzzyTableErrorRaised in either of these cases:
- Scenario 1:
- FuzzyTable
header_row_seekis True - FuzzyTable
fieldsparameter is empty
- FuzzyTable
- Scenario 2:
- FuzzyTable was passed an invalid
fieldsargument.
- FuzzyTable was passed an invalid
- Valid
fieldsarguments: - string
- FieldPattern instance
- sequence of the above (in combination also acceptable)
-
exception
fuzzytable.exceptions.InvalidFileError(path)¶ Bases:
fuzzytable.exceptions.FuzzyTableErrorRaised if FuzzyTable was passed a
paththat it cannot handle.
-
exception
fuzzytable.exceptions.InvalidRatioError(min_ratio)¶ Bases:
fuzzytable.exceptions.FuzzyTableErrorRaised if FuzzyTable was passed an invalid
min_ratioargument.min_ratiomust be a float between 0 and 1.
-
exception
fuzzytable.exceptions.InvalidRowError(row_num)¶ Bases:
fuzzytable.exceptions.FuzzyTableError,LookupErrorRaised if FuzzyTable was passed an invalid
header_rowargument.- Valid
header_rowarguments include: - None
- positive (non-zero) integer
- Valid
-
exception
fuzzytable.exceptions.InvalidSeekError(header_seek_param)¶ Bases:
fuzzytable.exceptions.FuzzyTableError,TypeErrorRaised if FuzzyTable was passed an invalid
header_seekargument.- Valid
header_seekarguments: - 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.FuzzyTableErrorRaised if a CellPattern was passed an invalid
modeargument.- Valid cellpattern
modearguments are: exactapproxcontains
- Valid cellpattern
-
exception
fuzzytable.exceptions.SheetnameError(path, sheetname)¶ Bases:
fuzzytable.exceptions.FuzzyTableError,KeyErrorRaised if an excel workbook is missing the
sheetnameworksheet.
-
exception
fuzzytable.exceptions.UninstantiatededCellPatternError(cellpattern_class)¶ Bases:
fuzzytable.exceptions.FuzzyTableErrorSome cell patterns must be instantiated prior to passing to a FieldPattern.