exceptions
LucidLink Python Library - Exception Classes
This module defines custom exception classes for LucidLink-specific errors (client lifecycle, filespace operations, authentication, configuration).
Filesystem operations raise standard Python exceptions for seamless interoperability with existing Python code:
FileNotFoundError– file or directory does not existFileExistsError– file or directory already existsNotADirectoryError– expected a directoryIsADirectoryError– expected a file, got a directoryPermissionError– insufficient permissions or wrong credentialsValueError– invalid path or argumentTimeoutError– operation timed outConnectionError– network/transport failureOSError– general system-level error
This means standard try/except patterns work as expected:
try:
data = filespace.fs.read_file("/missing.txt")
except FileNotFoundError:
print("File does not exist")
except PermissionError:
print("No read access")
- exception lucidlink.exceptions.AuthenticationError[source]
Bases:
LucidLinkErrorRaised when authentication fails.
Note: Most authentication errors are mapped to Python’s PermissionError. This is for authentication-specific context where needed.
- exception lucidlink.exceptions.ClientError[source]
Bases:
LucidLinkErrorRaised when
Clientlifecycle operations fail.Examples: client initialization failed, runtime startup failed, teardown error. Authentication failures use
AuthenticationErrorinstead.
- exception lucidlink.exceptions.ConfigurationError[source]
Bases:
LucidLinkError,ValueErrorRaised when configuration is invalid.
Inherits from both LucidLinkError and ValueError for compatibility.
- exception lucidlink.exceptions.DaemonError[source]
Bases:
LucidLinkErrorRaised when daemon operations fail.
Examples: daemon already running, daemon not started, daemon initialization failed
Deprecated since version Used: by the deprecated
Daemonclass. New code should useClientand catchClientError.
- exception lucidlink.exceptions.FilespaceAlreadyLinkedError(*args, filespace_id: str = '')[source]
Bases:
FilespaceErrorRaised when linking a filespace that is already linked under a different identifier (e.g. linked by id earlier, now requested by name).
link_filespace()catches this internally to return the existing liveFilespace— its idempotency contract — so callers rarely see it. It surfaces only if the existing link can no longer be resolved.The runtime classifies this case by exception type (the
AlreadyLinkedExceptionFFI category) and carries the canonical id as a structured field, surfaced here as thefilespace_idattribute — it is never parsed out of the human message. A reworded message therefore changes nothing, and the error can never be mistaken for an unrelated failure such as a network drop.
- exception lucidlink.exceptions.FilespaceError[source]
Bases:
LucidLinkErrorRaised when filespace operations fail.
Examples: filespace not linked, filespace connection failed, invalid filespace ID