Skip to content

Exceptions

zenml.exceptions

ZenML specific exception definitions.

Classes

ArtifactInterfaceError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raises exception when interacting with the Artifact interface in an unsupported way.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

ArtifactStoreInterfaceError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raises exception when interacting with the Artifact Store interface in an unsupported way.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

AuthorizationException(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raised when an authorization error occurred while trying to access a ZenML resource .

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

BackupSecretsStoreNotConfiguredError

Bases: NotImplementedError

Raised when a backup secrets store is not configured.

CredentialsNotValid(message: Optional[str] = None, url: Optional[str] = None)

Bases: AuthorizationException

Raised when the credentials provided are invalid.

This is a subclass of AuthorizationException and should only be raised when the authentication credentials are invalid (e.g. expired API token, invalid username/password, invalid signature). If caught by the ZenML client, it will trigger an invalidation of the currently cached API token and a re-authentication flow.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

CustomFlavorImportError

Bases: ImportError

Raised when failing to import a custom flavor.

DoesNotExistException(message: str)

Bases: ZenMLBaseException

Raises exception when the entity does not exist in the system but an action is being done that requires it to be present.

Initializes the exception.

Parameters:

Name Type Description Default
message str

Message with details of exception.

required
Source code in src/zenml/exceptions.py
64
65
66
67
68
69
70
def __init__(self, message: str):
    """Initializes the exception.

    Args:
        message: Message with details of exception.
    """
    super().__init__(message)
Functions

DuplicateRunNameError(message: str = 'Unable to run a pipeline with a run name that already exists.')

Bases: RuntimeError

Raises exception when a run with the same name already exists.

Initializes the exception.

Parameters:

Name Type Description Default
message str

Message with details of exception.

'Unable to run a pipeline with a run name that already exists.'
Source code in src/zenml/exceptions.py
150
151
152
153
154
155
156
157
158
159
160
def __init__(
    self,
    message: str = "Unable to run a pipeline with a run name that "
    "already exists.",
):
    """Initializes the exception.

    Args:
        message: Message with details of exception.
    """
    super().__init__(message)
Functions

DuplicatedConfigurationError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raised when a configuration parameter is set twice.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

EntityCreationError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException, RuntimeError

Raised when failing to create an entity.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

EntityExistsError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raised when trying to register an entity that already exists.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

GitException(message: str = 'There is a problem with git resolution. Please make sure that all relevant files are committed.')

Bases: ZenMLBaseException

Raises exception when a problem occurs in git resolution.

Initializes the exception.

Parameters:

Name Type Description Default
message str

Message with details of exception.

'There is a problem with git resolution. Please make sure that all relevant files are committed.'
Source code in src/zenml/exceptions.py
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
def __init__(
    self,
    message: str = "There is a problem with git resolution. "
    "Please make sure that all relevant files "
    "are committed.",
):
    """Initializes the exception.

    Args:
        message: Message with details of exception.
    """
    super().__init__(message)
Functions

GitNotFoundError

Bases: ImportError

Raised when ZenML CLI is used to interact with examples on a machine with no git installation.

HydrationError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raised when the model hydration failed.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

IllegalOperationError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raised when an illegal operation is attempted.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

InitializationException(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raised when an error occurred during initialization of a ZenML repository.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

InputResolutionError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raised when step input resolving failed.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

IntegrationError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raises exceptions when a requested integration can not be activated.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

MaterializerInterfaceError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raises exception when interacting with the Materializer interface in an unsupported way.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

MethodNotAllowedError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raised when the server does not allow a request method.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

OAuthError(error: str, status_code: int = 400, error_description: Optional[str] = None, error_uri: Optional[str] = None)

Bases: ValueError

OAuth2 error.

Initializes the OAuthError.

Parameters:

Name Type Description Default
status_code int

HTTP status code.

400
error str

Error code.

required
error_description Optional[str]

Error description.

None
error_uri Optional[str]

Error URI.

None
Source code in src/zenml/exceptions.py
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
def __init__(
    self,
    error: str,
    status_code: int = 400,
    error_description: Optional[str] = None,
    error_uri: Optional[str] = None,
) -> None:
    """Initializes the OAuthError.

    Args:
        status_code: HTTP status code.
        error: Error code.
        error_description: Error description.
        error_uri: Error URI.
    """
    self.status_code = status_code
    self.error = error
    self.error_description = error_description
    self.error_uri = error_uri
Functions
to_dict() -> Dict[str, Optional[str]]

Returns the OAuthError as a dictionary.

Returns:

Type Description
Dict[str, Optional[str]]

The OAuthError as a dictionary.

Source code in src/zenml/exceptions.py
266
267
268
269
270
271
272
273
274
275
276
def to_dict(self) -> Dict[str, Optional[str]]:
    """Returns the OAuthError as a dictionary.

    Returns:
        The OAuthError as a dictionary.
    """
    return {
        "error": self.error,
        "error_description": self.error_description,
        "error_uri": self.error_uri,
    }

PipelineConfigurationError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raises exceptions when a pipeline configuration contains invalid values.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

PipelineInterfaceError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raises exception when interacting with the Pipeline interface in an unsupported way.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

PipelineNotSucceededException(name: str = '', message: str = '{} is not yet completed successfully.')

Bases: ZenMLBaseException

Raises exception when trying to fetch artifacts from a not succeeded pipeline.

Initializes the exception.

Parameters:

Name Type Description Default
name str

Name of the pipeline.

''
message str

Message with details of exception.

'{} is not yet completed successfully.'
Source code in src/zenml/exceptions.py
76
77
78
79
80
81
82
83
84
85
86
87
def __init__(
    self,
    name: str = "",
    message: str = "{} is not yet completed successfully.",
):
    """Initializes the exception.

    Args:
        name: Name of the pipeline.
        message: Message with details of exception.
    """
    super().__init__(message.format(name))
Functions

ProvisioningError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raised when an error occurs when provisioning resources for a StackComponent.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

SecretsStoreNotConfiguredError

Bases: NotImplementedError

Raised when a secrets store is not configured.

SettingsResolvingError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raised when resolving settings failed.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

StackComponentDeploymentError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raises exception when deploying a stack component fails.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

StackComponentInterfaceError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raises exception when interacting with the stack components in an unsupported way.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

StackComponentValidationError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raised when a stack component configuration is not valid.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

StackValidationError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raised when a stack configuration is not valid.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

StepContextError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raises exception when interacting with a StepContext in an unsupported way.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

StepInterfaceError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raises exception when interacting with the Step interface in an unsupported way.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

SubscriptionUpgradeRequiredError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raised when user tries to perform an action outside their current subscription tier.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

ValidationError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raised when the Model passed to the ZenStore.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

WebhookInactiveError(message: Optional[str] = None, url: Optional[str] = None)

Bases: ZenMLBaseException

Raised when source is inactive.

Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)

ZenKeyError(message: str)

Bases: KeyError

Specialized key error which allows error messages with line breaks.

Initialization.

Parameters:

Name Type Description Default
message str

str, the error message

required
Source code in src/zenml/exceptions.py
226
227
228
229
230
231
232
def __init__(self, message: str) -> None:
    """Initialization.

    Args:
        message:str, the error message
    """
    self.message = message
Functions

ZenMLBaseException(message: Optional[str] = None, url: Optional[str] = None)

Bases: Exception

Base exception for all ZenML Exceptions.

The BaseException used to format messages displayed to the user.

Parameters:

Name Type Description Default
message Optional[str]

Message with details of exception. This message will be appended with another message directing user to url for more information. If None, then default Exception behavior is used.

None
url Optional[str]

URL to point to in exception message. If None, then no url is appended.

None
Source code in src/zenml/exceptions.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def __init__(
    self,
    message: Optional[str] = None,
    url: Optional[str] = None,
):
    """The BaseException used to format messages displayed to the user.

    Args:
        message: Message with details of exception. This message
                 will be appended with another message directing user to
                 `url` for more information. If `None`, then default
                 Exception behavior is used.
        url: URL to point to in exception message. If `None`, then no url
             is appended.
    """
    if message and url:
        message += f" For more information, visit {url}."
    super().__init__(message)
Functions