From fa4997fbb97d636b1b367a6862d819c96023f420 Mon Sep 17 00:00:00 2001 From: neobooru <50623835+neobooru@users.noreply.github.com> Date: Mon, 7 Jun 2021 00:37:30 +0200 Subject: [PATCH] server: fix issue where no video files could be uploaded --- server/szurubooru/func/image_hash.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/szurubooru/func/image_hash.py b/server/szurubooru/func/image_hash.py index 8d1cd2a..a445e62 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." )