Loading...

verticapy.errors.ExtensionError#

exception verticapy.errors.ExtensionError#

An exception raised when an error occurs related to the use or integration of extensions. This error typically indicates issues such as unsupported or incompatible extensions, configuration problems, or challenges in the extension’s functionality, hindering its successful use within a system or application.

Examples#

The following function checks if the input file is a CSV. It raises an error if that is not the case.

from verticapy.errors import ExtensionError

def is_csv(file_name: str):

    if file_name.lower().split(".")[1] != 'csv':

        raise ExtensionError(
            "The input file is not a CSV."
        )

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.