fix: catch ImportError for pillow_jxl module

This commit is contained in:
Travis Abendshien
2025-01-31 16:30:06 -08:00
parent 880c8ef45f
commit a2f9685bc0

View File

@@ -13,7 +13,6 @@ from pathlib import Path
import cv2
import numpy as np
import pillow_jxl # noqa: F401
import rawpy
import structlog
from mutagen import MutagenError, flac, id3, mp4
@@ -68,6 +67,11 @@ logger = structlog.get_logger(__name__)
register_heif_opener()
register_avif_opener()
try:
import pillow_jxl # noqa: F401
except ImportError:
logger.exception('[ThumbRenderer] Could not import the "pillow_jxl" module')
class ThumbRenderer(QObject):
"""A class for rendering image and file thumbnails."""