exiftool.exceptions
This submodule holds all of the custom exceptions which can be raised by PyExifTool
Module Contents
- exception exiftool.exceptions.ExifToolException
Bases:
Exception
Generic Base class for all ExifTool error classes
Initialize self. See help(type(self)) for accurate signature.
- exception exiftool.exceptions.ExifToolExecuteError(exit_status, cmd_stdout, cmd_stderr, params)
Bases:
ExifToolExecuteException
ExifTool executed the command but returned a non-zero exit status.
Note
There is a similarly named
ExifToolExecuteException
which this Error inherits from.That is a base class and never returned directly. This is what is raised.
Initialize self. See help(type(self)) for accurate signature.
- exception exiftool.exceptions.ExifToolExecuteException(message, exit_status, cmd_stdout, cmd_stderr, params)
Bases:
ExifToolException
This is the base exception class for all execute() associated errors.
This exception is never returned directly from any method, but provides common interface for subclassed errors.
(mimics the signature of
subprocess.CalledProcessError
)- Attribute cmd:
Parameters sent to exiftool which raised the error
- Attribute returncode:
Exit Status (Return code) of the
execute()
command which raised the error- Attribute stdout:
STDOUT stream returned by the command which raised the error
- Attribute stderr:
STDERR stream returned by the command which raised the error
Initialize self. See help(type(self)) for accurate signature.
- exception exiftool.exceptions.ExifToolJSONInvalidError(exit_status, cmd_stdout, cmd_stderr, params)
Bases:
ExifToolExecuteException
ExifTool execute_json() expected valid JSON to be returned, but got invalid JSON.
This is an error, because if you expect non-JSON output, don’t use execute_json()
Note
Only thrown by execute_json()
Initialize self. See help(type(self)) for accurate signature.
- exception exiftool.exceptions.ExifToolNotRunning(message)
Bases:
ExifToolProcessStateError
ExifTool is not running
Initialize self. See help(type(self)) for accurate signature.
- Parameters:
message (str) –
- exception exiftool.exceptions.ExifToolOutputEmptyError(exit_status, cmd_stdout, cmd_stderr, params)
Bases:
ExifToolExecuteException
ExifTool execute_json() expected output, but execute() did not return any output on stdout
This is an error, because if you expect no output, don’t use execute_json()
Note
Only thrown by execute_json()
Initialize self. See help(type(self)) for accurate signature.
- exception exiftool.exceptions.ExifToolProcessStateError
Bases:
ExifToolException
Base class for all errors related to the invalid state of exiftool subprocess
Initialize self. See help(type(self)) for accurate signature.
- exception exiftool.exceptions.ExifToolRunning(message)
Bases:
ExifToolProcessStateError
ExifTool is already running
Initialize self. See help(type(self)) for accurate signature.
- Parameters:
message (str) –
- exception exiftool.exceptions.ExifToolTagNameError(bad_tag)
Bases:
ExifToolException
ExifToolHelper found an invalid tag name
This error is raised when
exiftool.ExifToolHelper.check_tag_names
is enabled, and a bad tag is provided to a methodInitialize self. See help(type(self)) for accurate signature.
- exception exiftool.exceptions.ExifToolVersionError
Bases:
ExifToolException
Generic Error to represent some version mismatch. PyExifTool is coded to work with a range of exiftool versions. If the advanced params change in functionality and break PyExifTool, this error will be thrown
Initialize self. See help(type(self)) for accurate signature.