Source
Media source resolution exception family.
MediaSourceAccessDeniedError(*, source_path=None, debug_info=None)
Bases: _SourcePathMessage, MediaError, PermissionError
Report that the current process lacks access to a media source.
Use this when file permissions or source credentials prevent a read.
Example
The application cannot read a protected media file.
from gllm_multimodal.exceptions import MediaSourceAccessDeniedError
error = MediaSourceAccessDeniedError(source_path="/data/private.mp4")
print(error.message)
We could not access /data/private.mp4. Check the application's permissions.
MediaSourceNotFoundError(*, source_path=None, debug_info=None)
Bases: _SourcePathMessage, MediaError, FileNotFoundError
Report a media source that the requested read could not locate.
Use this when a local file path or remote source no longer exists.
Example
A local media file is missing when the read begins.
from gllm_multimodal.exceptions import MediaSourceNotFoundError
error = MediaSourceNotFoundError(source_path="/data/video.mp4")
print(error.message)
We could not find /data/video.mp4. Check that it exists and is available to this application.
MediaSourceReadError(*, source_path=None, debug_info=None)
Bases: _SourcePathMessage, MediaError, OSError
Report a source read failure outside the specific source error cases.
Use this when a source exists and is accessible but cannot be read due to another file or connection failure.
Example
The connection closes while downloading a media file.
from textwrap import fill
from gllm_multimodal.exceptions import MediaSourceReadError
error = MediaSourceReadError(source_path="https://example.com/video.mp4")
print(fill(error.message, width=100))
We could not read https://example.com/video.mp4. Check the source address, credentials, and
connection, then try again.
MediaSourceReadTimeoutError(*, source_path=None, debug_info=None)
Bases: _SourcePathMessage, MediaError, TimeoutError
Report a source read that exceeded its time limit.
Use this when reading a remote or local source takes longer than allowed.
Example
A remote media source does not respond before the read deadline.
from gllm_multimodal.exceptions import MediaSourceReadTimeoutError
error = MediaSourceReadTimeoutError(source_path="https://example.com/video.mp4")
print(error.message)
Reading https://example.com/video.mp4 timed out. Retry later if repeating the read is safe.