# `wand.exceptions` — Errors and warnings

This module maps MagickWand API’s errors and warnings to Python’s native exceptions and warnings. You can catch all MagickWand errors using Python’s natural way to catch errors.

See also

ImageMagick Exceptions

Added in version 0.1.1.

Changed in version 0.5.8: Warning & Error Exceptions are now explicitly defined. Previously ImageMagick domain-based errors were dynamically generated at runtime.

exception wand.exceptions.BaseError

  Bases: `WandException`

  Base class for Wand-related errors.

  Added in version 0.4.4.

exception wand.exceptions.BaseFatalError

  Bases: `WandException`

  Base class for Wand-related fatal errors.

  Added in version 0.4.4.

exception wand.exceptions.BaseWarning

  Bases: `WandException`, `Warning`

  Base class for Wand-related warnings.

  Added in version 0.4.4.

exception wand.exceptions.BlobError

  Bases: `BaseError`, `OSError`

  A binary large object could not be allocated, read, or written.

exception wand.exceptions.BlobFatalError

  Bases: `BaseFatalError`, `OSError`

  A binary large object could not be allocated, read, or written.

exception wand.exceptions.BlobWarning

  Bases: `BaseWarning`, `OSError`

  A binary large object could not be allocated, read, or written.

exception wand.exceptions.CacheError

  Bases: `BaseError`

  Pixels could not be read or written to the pixel cache.

exception wand.exceptions.CacheFatalError

  Bases: `BaseFatalError`

  Pixels could not be read or written to the pixel cache.

exception wand.exceptions.CacheWarning

  Bases: `BaseWarning`

  Pixels could not be read or written to the pixel cache.

exception wand.exceptions.CoderError

  Bases: `BaseError`

  There was a problem with an image coder.

exception wand.exceptions.CoderFatalError

  Bases: `BaseFatalError`

  There was a problem with an image coder.

exception wand.exceptions.CoderWarning

  Bases: `BaseWarning`

  There was a problem with an image coder.

exception wand.exceptions.ConfigureError

  Bases: `BaseError`

  There was a problem getting a configuration file.

exception wand.exceptions.ConfigureFatalError

  Bases: `BaseFatalError`

  There was a problem getting a configuration file.

exception wand.exceptions.ConfigureWarning

  Bases: `BaseWarning`

  There was a problem getting a configuration file.

exception wand.exceptions.CorruptImageError

  Bases: `BaseError`, `ValueError`

  The image file may be corrupt.

exception wand.exceptions.CorruptImageFatalError

  Bases: `BaseFatalError`, `ValueError`

  The image file may be corrupt.

exception wand.exceptions.CorruptImageWarning

  Bases: `BaseWarning`, `ValueError`

  The image file may be corrupt.

exception wand.exceptions.DelegateError

  Bases: `BaseError`

  An ImageMagick delegate failed to complete.

exception wand.exceptions.DelegateFatalError

  Bases: `BaseFatalError`

  An ImageMagick delegate failed to complete.

exception wand.exceptions.DelegateWarning

  Bases: `BaseWarning`

  An ImageMagick delegate failed to complete.

exception wand.exceptions.DrawError

  Bases: `BaseError`

  A drawing operation failed.

exception wand.exceptions.DrawFatalError

  Bases: `BaseFatalError`

  A drawing operation failed.

exception wand.exceptions.DrawWarning

  Bases: `BaseWarning`

  A drawing operation failed.

exception wand.exceptions.FileOpenError

  Bases: `BaseError`, `OSError`

  The image file could not be opened for reading or writing.

exception wand.exceptions.FileOpenFatalError

  Bases: `BaseFatalError`, `OSError`

  The image file could not be opened for reading or writing.

exception wand.exceptions.FileOpenWarning

  Bases: `BaseWarning`, `OSError`

  The image file could not be opened for reading or writing.

exception wand.exceptions.ImageError

  Bases: `BaseError`

  The operation could not complete due to an incompatible image.

exception wand.exceptions.ImageFatalError

  Bases: `BaseFatalError`

  The operation could not complete due to an incompatible image.

exception wand.exceptions.ImageWarning

  Bases: `BaseWarning`

  The operation could not complete due to an incompatible image.

exception wand.exceptions.MissingDelegateError

  Bases: `BaseError`, `ImportError`

  The image type can not be read or written because the appropriate; delegate is missing.

exception wand.exceptions.MissingDelegateFatalError

  Bases: `BaseFatalError`, `ImportError`

  The image type can not be read or written because the appropriate; delegate is missing.

exception wand.exceptions.MissingDelegateWarning

  Bases: `BaseWarning`, `ImportError`

  The image type can not be read or written because the appropriate; delegate is missing.

exception wand.exceptions.ModuleError

  Bases: `BaseError`

  There was a problem with an image module.

exception wand.exceptions.ModuleFatalError

  Bases: `BaseFatalError`

  There was a problem with an image module.

exception wand.exceptions.ModuleWarning

  Bases: `BaseWarning`

  There was a problem with an image module.

exception wand.exceptions.MonitorError

  Bases: `BaseError`

  There was a problem activating the progress monitor.

exception wand.exceptions.MonitorFatalError

  Bases: `BaseFatalError`

  There was a problem activating the progress monitor.

exception wand.exceptions.MonitorWarning

  Bases: `BaseWarning`

  There was a problem activating the progress monitor.

exception wand.exceptions.OptionError

  Bases: `BaseError`

  A command-line option was malformed.

exception wand.exceptions.OptionFatalError

  Bases: `BaseFatalError`

  A command-line option was malformed.

exception wand.exceptions.OptionWarning

  Bases: `BaseWarning`

  A command-line option was malformed.

exception wand.exceptions.PolicyError

  Bases: `BaseError`

  A policy denies access to a delegate, coder, filter, path, or resource.

exception wand.exceptions.PolicyFatalError

  Bases: `BaseFatalError`

  A policy denies access to a delegate, coder, filter, path, or resource.

exception wand.exceptions.PolicyWarning

  Bases: `BaseWarning`

  A policy denies access to a delegate, coder, filter, path, or resource.

exception wand.exceptions.RandomError

  Bases: `BaseError`

  There is a problem generating a true or pseudo-random number.

exception wand.exceptions.RandomFatalError

  Bases: `BaseFatalError`

  There is a problem generating a true or pseudo-random number.

exception wand.exceptions.RandomWarning

  Bases: `BaseWarning`

  There is a problem generating a true or pseudo-random number.

exception wand.exceptions.RegistryError

  Bases: `BaseError`

  There was a problem getting or setting the registry.

exception wand.exceptions.RegistryFatalError

  Bases: `BaseFatalError`

  There was a problem getting or setting the registry.

exception wand.exceptions.RegistryWarning

  Bases: `BaseWarning`

  There was a problem getting or setting the registry.

exception wand.exceptions.ResourceLimitError

  Bases: `BaseError`, `MemoryError`

  A program resource is exhausted e.g. not enough memory.

exception wand.exceptions.ResourceLimitFatalError

  Bases: `BaseFatalError`, `MemoryError`

  A program resource is exhausted e.g. not enough memory.

exception wand.exceptions.ResourceLimitWarning

  Bases: `BaseWarning`, `MemoryError`

  A program resource is exhausted e.g. not enough memory.

exception wand.exceptions.StreamError

  Bases: `BaseError`, `OSError`

  There was a problem reading or writing from a stream.

exception wand.exceptions.StreamFatalError

  Bases: `BaseFatalError`, `OSError`

  There was a problem reading or writing from a stream.

exception wand.exceptions.StreamWarning

  Bases: `BaseWarning`, `OSError`

  There was a problem reading or writing from a stream.

exception wand.exceptions.TypeError

  Bases: `BaseError`

  A font is unavailable; a substitution may have occurred.

exception wand.exceptions.TypeFatalError

  Bases: `BaseFatalError`

  A font is unavailable; a substitution may have occurred.

exception wand.exceptions.TypeWarning

  Bases: `BaseWarning`

  A font is unavailable; a substitution may have occurred.

exception wand.exceptions.WandError

  Bases: `BaseError`

  There was a problem specific to the MagickWand API.

exception wand.exceptions.WandException

  Bases: `Exception`

  All Wand-related exceptions are derived from this class.

exception wand.exceptions.WandFatalError

  Bases: `BaseFatalError`

  There was a problem specific to the MagickWand API.

exception wand.exceptions.WandLibraryVersionError

  Bases: `WandException`

  Base class for Wand-related ImageMagick version errors.

  Added in version 0.3.2.

exception wand.exceptions.WandRuntimeError

  Bases: `WandException`, `RuntimeError`

  Generic class for Wand-related runtime errors.

  Added in version 0.5.2.

exception wand.exceptions.WandWarning

  Bases: `BaseWarning`

  There was a problem specific to the MagickWand API.

exception wand.exceptions.XServerError

  Bases: `BaseError`

  An X resource is unavailable.

exception wand.exceptions.XServerFatalError

  Bases: `BaseFatalError`

  An X resource is unavailable.

exception wand.exceptions.XServerWarning

  Bases: `BaseWarning`

  An X resource is unavailable.