From 03d9c2dbc4e7356471751b25e41a429afff6a4ec Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 2 May 2022 16:48:19 +0530 Subject: [PATCH] Ignore undecodeable GIFs in MOBI files --- src/calibre/ebooks/mobi/reader/mobi6.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/ebooks/mobi/reader/mobi6.py b/src/calibre/ebooks/mobi/reader/mobi6.py index 76c31881a4..0daab71749 100644 --- a/src/calibre/ebooks/mobi/reader/mobi6.py +++ b/src/calibre/ebooks/mobi/reader/mobi6.py @@ -915,6 +915,8 @@ class MobiReader: imgfmt = 'png' except AnimatedGIF: pass + except OSError: + continue path = os.path.join(output_dir, '%05d.%s' % (image_index, imgfmt)) image_name_map[image_index] = os.path.basename(path) if imgfmt == 'png':