Skip to content
This repository was archived by the owner on Jun 15, 2024. It is now read-only.

PIL OSError when font is missing #9

@sam210723

Description

@sam210723

PIL throws an OSError when it can't load a font

Traceback (most recent call last):
  File "enhance-ir.py", line 338, in <module>
    init()
  File "enhance-ir.py", line 82, in init
    handle_input(args.INPUT)
  File "enhance-ir.py", line 184, in handle_input
    process(input)
  File "enhance-ir.py", line 244, in process
    fnt = ImageFont.truetype("arialbd.ttf", size=38)
  File "/usr/lib/python3/dist-packages/PIL/ImageFont.py", line 280, in truetype
    return FreeTypeFont(font, size, index, encoding, layout_engine)
  File "/usr/lib/python3/dist-packages/PIL/ImageFont.py", line 145, in __init__
    layout_engine=layout_engine)
OSError: cannot open resource

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions