diff --git a/memory/ui_detect.py b/memory/ui_detect.py index 48e31221..1357ee0d 100644 --- a/memory/ui_detect.py +++ b/memory/ui_detect.py @@ -105,7 +105,7 @@ def visualize(image_path, elements, output_path=None): draw = ImageDraw.Draw(img) try: font = ImageFont.truetype("msyh.ttc", 14) - except: + except Exception: font = ImageFont.load_default() for el in elements: x1, y1, x2, y2 = el['bbox']