Skip to content

Commit

Permalink
fix: catch NotImplementedError
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanVoxel committed Mar 8, 2025
1 parent 981cc60 commit ffc68ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tagstudio/src/qt/widgets/preview/preview_thumb.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def _update_image(self, filepath: Path, ext: str) -> dict:
image = Image.open(str(filepath))
stats["width"] = image.width
stats["height"] = image.height
except (UnidentifiedImageError, FileNotFoundError) as e:
except (UnidentifiedImageError, FileNotFoundError, NotImplementedError) as e:
logger.error("[PreviewThumb] Could not get image stats", filepath=filepath, error=e)
elif MediaCategories.is_ext_in_category(
ext, MediaCategories.IMAGE_VECTOR_TYPES, mime_fallback=True
Expand Down
1 change: 1 addition & 0 deletions tagstudio/src/qt/widgets/thumb_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,7 @@ def _image_thumb(self, filepath: Path) -> Image.Image:
except (
UnidentifiedImageError,
DecompressionBombError,
NotImplementedError,
) as e:
logger.error("Couldn't render thumbnail", filepath=filepath, error=type(e).__name__)
return im
Expand Down

0 comments on commit ffc68ac

Please sign in to comment.