You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sub = SubtitlesClip(subtitle_path, font_path, encoding="utf-8") ###ERROR HERE
text_clips = []
for item in sub.subtitles:
clip = create_text_clip(subtitle_item=item)
text_clips.append(clip)
video_clip = CompositeVideoClip([video_clip, *text_clips])
error:
Traceback (most recent call last):
File "/Users/jack/Ai/MoneyPrinterTurbo/.venv/lib/python3.11/site-packages/PIL/ImageDraw.py", line 443, in draw_text
mask, offset = font.getmask2(
^^^^^^^^^^^^^^
File "/Users/jack/Ai/MoneyPrinterTurbo/.venv/lib/python3.11/site-packages/PIL/ImageFont.py", line 748, in getmask2
im = fill("RGBA" if mode == "RGBA" else "L", size, 0)
**TypeError: 'float' object cannot be interpreted as an integer**
moviepy. update. 2.0!
how can i do ??
python 3.11
pillow~=10.0.0
The text was updated successfully, but these errors were encountered:
I cannot reproduce the bug, so I guess it must come from your create_text_clip function, also I dont understand the objective of your demo code, you shouldn't need to iterate of subtitles, if you need some code to custom handling generation of subtitles you should look into the make_textclip parameter of SubtitlesClip instead.
when use SubtitlesClip.
error:
moviepy. update. 2.0!
how can i do ??
python 3.11
pillow~=10.0.0
The text was updated successfully, but these errors were encountered: