The Error class is a metadata with no behavior. It's used to describe an error that happened during Framework work or during the validation.
To create a custom error you basically just need to fill the required class fields:
from frictionless import errors
class DuplicateRowError(errors.RowError):
code = "duplicate-row"
name = "Duplicate Row"
tags = ["#table", "#row", "#duplicate"]
template = "Row at position {rowPosition} is duplicated: {note}"
description = "The row is duplicated."
The Stats represent various describe/validate stats:
from frictionless import describe
resource = describe('table.csv', stats=True)
print(resource.stats)
{'md5': '6c2c61dd9b0e9c6876139a449ed87933',
'sha256': 'a1fd6c5ff3494f697874deeb07f69f8667e903dd94a7bc062dd57550cea26da8',
'bytes': 30,
'fields': 2,
'rows': 2}
Error representation. It is a baseclass from which other subclasses of errors are inherited or derived from.
(*, note: str) -> None
A human readable informative comprehensive description of the error. It can be set to any custom text. If not set, default description is more comprehensive with error type, message and reasons included.
ClassVar[str]
A human readable informative comprehensive description of the error. It can be set to any custom text. If not set, default description is more comprehensive with error type, message and reasons included.
ClassVar[str]
A human readable informative comprehensive description of the error. It can be set to any custom text. If not set, default description is more comprehensive with error type, message and reasons included.
ClassVar[str]
A human readable informative comprehensive description of the error. It can be set to any custom text. If not set, default description is more comprehensive with error type, message and reasons included.
ClassVar[str]
A human readable informative comprehensive description of the error. It can be set to any custom text. If not set, default description is more comprehensive with error type, message and reasons included.
ClassVar[List[str]]
A human readable informative comprehensive description of the error. It can be set to any custom text. If not set, default description is more comprehensive with error type, message and reasons included.
str
A short human readable description of the error. It can be set to any custom text.
str
Stats representation This class stores stats of the validation task.
(*, md5: Optional[str] = None, sha256: Optional[str] = None, bytes: Optional[int] = None, fields: Optional[int] = None, rows: Optional[int] = None, tasks: Optional[int] = None, warnings: Optional[int] = None, errors: Optional[int] = None, seconds: Optional[float] = None) -> None
Hashed value of data with md5 hashing algorithm.
Optional[str]
Hashed value of data with sha256 hashing algorithm.
Optional[str]
Size of data in bytes.
Optional[int]
Number of fields in a resource.
Optional[int]
Number of rows in a resource.
Optional[int]
Number of resource to validate.
Optional[int]
Number of warnings from the validation task. Warnings are information to users about non severe problems such as "limits reached".
Optional[int]
Number of errors from the validation task.
Optional[int]
Time taken in secs to validate a resource.
Optional[float]