:py:mod:`exiftool.exceptions` ============================= .. py:module:: exiftool.exceptions .. autoapi-nested-parse:: This submodule holds all of the custom exceptions which can be raised by PyExifTool Module Contents --------------- .. py:exception:: ExifToolException Bases: :py:obj:`Exception` .. autoapi-inheritance-diagram:: exiftool.exceptions.ExifToolException :parts: 1 Generic Base class for all ExifTool error classes Initialize self. See help(type(self)) for accurate signature. .. py:exception:: ExifToolExecuteError(exit_status, cmd_stdout, cmd_stderr, params) Bases: :py:obj:`ExifToolExecuteException` .. autoapi-inheritance-diagram:: exiftool.exceptions.ExifToolExecuteError :parts: 1 ExifTool executed the command but returned a non-zero exit status. .. note:: There is a similarly named :py:exc:`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. .. py:exception:: ExifToolExecuteException(message, exit_status, cmd_stdout, cmd_stderr, params) Bases: :py:obj:`ExifToolException` .. autoapi-inheritance-diagram:: exiftool.exceptions.ExifToolExecuteException :parts: 1 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 :py:class:`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. .. py:exception:: ExifToolJSONInvalidError(exit_status, cmd_stdout, cmd_stderr, params) Bases: :py:obj:`ExifToolExecuteException` .. autoapi-inheritance-diagram:: exiftool.exceptions.ExifToolJSONInvalidError :parts: 1 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. .. py:exception:: ExifToolNotRunning(message) Bases: :py:obj:`ExifToolProcessStateError` .. autoapi-inheritance-diagram:: exiftool.exceptions.ExifToolNotRunning :parts: 1 ExifTool is not running Initialize self. See help(type(self)) for accurate signature. .. py:exception:: ExifToolOutputEmptyError(exit_status, cmd_stdout, cmd_stderr, params) Bases: :py:obj:`ExifToolExecuteException` .. autoapi-inheritance-diagram:: exiftool.exceptions.ExifToolOutputEmptyError :parts: 1 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. .. py:exception:: ExifToolProcessStateError Bases: :py:obj:`ExifToolException` .. autoapi-inheritance-diagram:: exiftool.exceptions.ExifToolProcessStateError :parts: 1 Base class for all errors related to the invalid state of `exiftool` subprocess Initialize self. See help(type(self)) for accurate signature. .. py:exception:: ExifToolRunning(message) Bases: :py:obj:`ExifToolProcessStateError` .. autoapi-inheritance-diagram:: exiftool.exceptions.ExifToolRunning :parts: 1 ExifTool is already running Initialize self. See help(type(self)) for accurate signature. .. py:exception:: ExifToolTagNameError(bad_tag) Bases: :py:obj:`ExifToolException` .. autoapi-inheritance-diagram:: exiftool.exceptions.ExifToolTagNameError :parts: 1 ExifToolHelper found an invalid tag name This error is raised when :py:attr:`exiftool.ExifToolHelper.check_tag_names` is enabled, and a bad tag is provided to a method Initialize self. See help(type(self)) for accurate signature. .. py:exception:: ExifToolVersionError Bases: :py:obj:`ExifToolException` .. autoapi-inheritance-diagram:: exiftool.exceptions.ExifToolVersionError :parts: 1 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.