FujiwaraChoki / MoneyPrinter

Automate Creation of YouTube Shorts using MoviePy.
MIT License
10.07k stars 1.35k forks source link

Error generating final video: expected str, bytes or os.PathLike object, not NoneType #255

Closed Mugeeboy closed 3 months ago

Mugeeboy commented 3 months ago

Describe the bug Throwing an error "expected str, bytes or os.PathLike object, not NoneType" at generating final video creation process

Please find the stack trace below, File "\Backend\main.py", line 246, in generate final_video_path = generate_video(combined_video_path, tts_path, subtitles_path, n_threads or 2, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "\Backend\video.py", line 236, in generate_video subtitles = SubtitlesClip(subtitles_path, generator) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "\venv\Lib\site-packages\moviepy\video\tools\subtitles.py", line 85, in init hasmask = bool(self.make_textclip('T').mask) ^^^^^^^^^^^^^^^^^^^^^^^ File "\Backend\video.py", line 223, in generator = lambda txt: TextClip( ^^^^^^^^^ File "\venv\Lib\site-packages\moviepy\video\VideoClip.py", line 1137, in init subprocess_call(cmd, logger=None) File "\venv\Lib\site-packages\moviepy\tools.py", line 46, in subprocess_call proc = sp.Popen(cmd, **popen_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\setup\Python\Lib\subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "A:\setup\Python\Lib\subprocess.py", line 1462, in _execute_child args = list2cmdline(args) ^^^^^^^^^^^^^^^^^^ File "A:\setup\Python\Lib\subprocess.py", line 608, in list2cmdline for arg in map(os. , seq): File "", line 859, in fsdecode TypeError: expected str, bytes or os.PathLike object, not NoneType

Please help here