Skip to content

create_trapping_clips: "arial.ttf" not found on Linux #14

Description

"arial.ttf" cannot be found on Ubuntu. Could maybe add an optional input argument for the font?

Start creating files
Traceback (most recent call last):
  File "create_trapping_clips.py", line 207, in <module>
    n_created_files = create_trap_db(tp_cfg, args.source, args.des)
  File "create_trapping_clips.py", line 129, in create_trap_db
    msg_videos = create_msg_video(cfg, des, s_f)
  File "create_trapping_clips.py", line 44, in create_msg_video
    create_msg_img(cfg, score, des, width, height)
  File "create_trapping_clips.py", line 85, in create_msg_img
    font = ImageFont.truetype("arial.ttf", font_size)
  File "/home/gmittag/miniconda3/lib/python3.8/site-packages/PIL/ImageFont.py", line 959, in truetype
    return freetype(font)
  File "/home/gmittag/miniconda3/lib/python3.8/site-packages/PIL/ImageFont.py", line 956, in freetype
    return FreeTypeFont(font, size, index, encoding, layout_engine)
  File "/home/gmittag/miniconda3/lib/python3.8/site-packages/PIL/ImageFont.py", line 247, in __init__
    self.font = core.getfont(
OSError: cannot open resource

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions