diff --git a/server/szurubooru/func/image_hash.py b/server/szurubooru/func/image_hash.py index 8d1cd2a6..a445e62d 100644 --- a/server/szurubooru/func/image_hash.py +++ b/server/szurubooru/func/image_hash.py @@ -44,7 +44,7 @@ def _preprocess_image(content: bytes) -> NpMatrix: try: img = Image.open(BytesIO(content)) return np.asarray(img.convert("L"), dtype=np.uint8) - except IOError: + except (IOError, ValueError): raise errors.ProcessingError( "Unable to generate a signature hash " "for this image." )