I'm getting an error of invalid font but I don't know why
File "C:\Users\Art\AppData\Local\Programs\Python\Python313\Lib\site-packages\decorator.py", line 235, in fun
return caller(func, *(extras + args), **kw)
File "C:\Users\Art\AppData\Local\Programs\Python\Python313\Lib\site-packages\moviepy\decorators.py", line 102, in wrapper
return func(*new_args, **new_kwargs)
File "C:\Users\Art\AppData\Local\Programs\Python\Python313\Lib\site-packages\moviepy\video\VideoClip.py", line 1579, in __init__
raise ValueError(
...<3 lines>...
)
ValueError: Invalid font [text], pillow failed to use it with error cannot open resource
And my config is:
txt_clip = TextClip(
display_text,
# fontsize=FONT_SIZE,
font=FONT_PATH,
color='white',
method='caption',
size=(CHAT_WIDTH, None),
text_align='left'
)
I commented the fontsize because it says it's unexpected. I don't understand why though.