verticapy.errors.OptionError#
- exception verticapy.errors.OptionError#
An exception raised when an error occurs due to invalid or unsupported options provided in a configuration or settings context. This error typically signifies issues such as unrecognized or incompatible options, hindering the correct configuration of a system or module.
Examples#
The following function checks if the input chart is supported.
from verticapy.errors import OptionError def is_supported_chart(kind: str): if kind not in ('bar', 'pie'): raise OptionError( f"The option '{kind}' is not supported." )
Note
OptionError
is a subclass ofValueError
.Note
Errors can be employed when implementing new functions to provide clear explanations for why a particular option or feature is not functioning as intended. It is essential to review all available errors to choose the most appropriate one.