prodogape / ComfyUI-EasyOCR

This node is primarily based on Easy-OCR to implement OCR text recognition functionality.
23 stars 4 forks source link

"PingFang Regular.ttf"字体文件名中多一个空格,导致找不到字体文件 #3

Open danielyuan opened 4 months ago

danielyuan commented 4 months ago

https://github.com/prodogape/ComfyUI-EasyOCR/blame/1e7a76ed5da15749a3277c5eb6cdd9daf2323db6/node.py#L107 "PingFang Regular.ttf" image docs目录中ttf文件名中没有空格。

clementine-of-whitewind commented 3 months ago

probably same here.

!!! Exception during processing!!! cannot open resource
Traceback (most recent call last):
  File "/mnt/SSD/ComfyUI/execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
  File "/mnt/SSD/ComfyUI/execution.py", line 82, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
  File "/mnt/SSD/ComfyUI/execution.py", line 75, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
  File "/mnt/SSD/ComfyUI/custom_nodes/ComfyUI-EasyOCR/node.py", line 243, in main
    image_tensor, mask_tensor, labelme_data = plot_boxes_to_image(image_pil, pred_dict)
  File "/mnt/SSD/ComfyUI/custom_nodes/ComfyUI-EasyOCR/node.py", line 109, in plot_boxes_to_image
    font = ImageFont.truetype(font_path, font_size)
  File "/home/crv2/.pyenv/versions/3.10.13/lib/python3.10/site-packages/PIL/ImageFont.py", line 996, in truetype
    return freetype(font)
  File "/home/crv2/.pyenv/versions/3.10.13/lib/python3.10/site-packages/PIL/ImageFont.py", line 993, in freetype
    return FreeTypeFont(font, size, index, encoding, layout_engine)
  File "/home/crv2/.pyenv/versions/3.10.13/lib/python3.10/site-packages/PIL/ImageFont.py", line 248, in __init__
    self.font = core.getfont(
OSError: cannot open resource