Skip to content

cloudpathlib.exceptions

This module contains all custom exceptions in the cloudpathlib library. All exceptions subclass the CloudPathException base exception to facilitate catching any exception from this library.

Classes

AnyPathTypeError (CloudPathException, TypeError)

Source code in cloudpathlib/exceptions.py
class AnyPathTypeError(CloudPathException, TypeError):
    pass

ClientMismatchError (CloudPathException, ValueError)

Source code in cloudpathlib/exceptions.py
class ClientMismatchError(CloudPathException, ValueError):
    pass

CloudPathException (Exception)

Base exception for all cloudpathlib custom exceptions.

Source code in cloudpathlib/exceptions.py
class CloudPathException(Exception):
    """Base exception for all cloudpathlib custom exceptions."""

CloudPathFileExistsError (CloudPathException, FileExistsError)

Source code in cloudpathlib/exceptions.py
class CloudPathFileExistsError(CloudPathException, FileExistsError):
    pass

CloudPathIsADirectoryError (CloudPathException, IsADirectoryError)

Source code in cloudpathlib/exceptions.py
class CloudPathIsADirectoryError(CloudPathException, IsADirectoryError):
    pass

CloudPathNotADirectoryError (CloudPathException, NotADirectoryError)

Source code in cloudpathlib/exceptions.py
class CloudPathNotADirectoryError(CloudPathException, NotADirectoryError):
    pass

DirectoryNotEmptyError (CloudPathException)

Source code in cloudpathlib/exceptions.py
class DirectoryNotEmptyError(CloudPathException):
    pass

IncompleteImplementationError (CloudPathException, NotImplementedError)

Source code in cloudpathlib/exceptions.py
class IncompleteImplementationError(CloudPathException, NotImplementedError):
    pass

InvalidPrefixError (CloudPathException, ValueError)

Source code in cloudpathlib/exceptions.py
class InvalidPrefixError(CloudPathException, ValueError):
    pass

MissingCredentialsError (CloudPathException)

Source code in cloudpathlib/exceptions.py
class MissingCredentialsError(CloudPathException):
    pass

MissingDependenciesError (CloudPathException, ModuleNotFoundError)

Source code in cloudpathlib/exceptions.py
class MissingDependenciesError(CloudPathException, ModuleNotFoundError):
    pass

NoStatError (CloudPathException)

Used if stats cannot be retrieved; e.g., file does not exist or for some backends path is a directory (which doesn't have stats available).

Source code in cloudpathlib/exceptions.py
class NoStatError(CloudPathException):
    """Used if stats cannot be retrieved; e.g., file does not exist
    or for some backends path is a directory (which doesn't have
    stats available).
    """

OverwriteDirtyFileError (CloudPathException)

Source code in cloudpathlib/exceptions.py
class OverwriteDirtyFileError(CloudPathException):
    pass

OverwriteNewerCloudError (CloudPathException)

Source code in cloudpathlib/exceptions.py
class OverwriteNewerCloudError(CloudPathException):
    pass

OverwriteNewerLocalError (CloudPathException)

Source code in cloudpathlib/exceptions.py
class OverwriteNewerLocalError(CloudPathException):
    pass