From 5e19fd757c5279bc709de11de8bfc9ba44e999b4 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 28 May 2023 14:15:50 +0200 Subject: [PATCH] Fix TypeError --- video_creation/final_video.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/video_creation/final_video.py b/video_creation/final_video.py index 0246a37..970d380 100644 --- a/video_creation/final_video.py +++ b/video_creation/final_video.py @@ -156,6 +156,9 @@ def make_final_video( # Gather all audio clips audio_clips = list() + if number_of_clips == 0: + print("No audio clips to gather. Please use a different TTS or post.") # This is to fix the TypeError: unsupported operand type(s) for +: 'int' and 'NoneType' + exit() if settings.config["settings"]["storymode"]: if settings.config["settings"]["storymodemethod"] == 0: audio_clips = [ffmpeg.input(f"assets/temp/{reddit_id}/mp3/title.mp3")]