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

Bases: CloudPathException, TypeError

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

ClientMismatchError

Bases: CloudPathException, ValueError

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

CloudPathException

Bases: Exception

Base exception for all cloudpathlib custom exceptions.

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

CloudPathFileExistsError

Bases: CloudPathException, FileExistsError

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

CloudPathIsADirectoryError

Bases: CloudPathException, IsADirectoryError

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

CloudPathNotADirectoryError

Bases: CloudPathException, NotADirectoryError

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

CloudPathNotExistsError

Bases: CloudPathException

Source code in cloudpathlib/exceptions.py
23
24
class CloudPathNotExistsError(CloudPathException):
    pass

CloudPathNotImplementedError

Bases: CloudPathException, NotImplementedError

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

DirectoryNotEmptyError

Bases: CloudPathException

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

IncompleteImplementationError

Bases: CloudPathException, NotImplementedError

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

InvalidConfigurationException

Bases: CloudPathException, ValueError

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

InvalidPrefixError

Bases: CloudPathException, ValueError

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

MissingCredentialsError

Bases: CloudPathException

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

MissingDependenciesError

Bases: CloudPathException, ModuleNotFoundError

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

NoStatError

Bases: 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
63
64
65
66
67
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

Bases: CloudPathException

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

OverwriteNewerCloudError

Bases: CloudPathException

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

OverwriteNewerLocalError

Bases: CloudPathException

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