#๐Ÿ”’ Help using moviepy

9 messages ยท Page 1 of 1 (latest)

lavish tundra
#

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.

rocky saddleBOT
#

@lavish tundra

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

lavish tundra
#

It's supposed to make an mp4 file of subtitles in the shape of a minecraft chat.

lavish tundra
#

I really hope someone knows how to use Moviepy

lavish tundra
#

Thanks for the help ig, I managed to fix it but now I can't find the attribute of 'CompositeVideoClip' to make a fade out

lavish tundra
#

I fixed it. Not really helpfull here

#

!close

rocky saddleBOT
#
Python help channel closed with !close

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.