srt_fix icon indicating copy to clipboard operation
srt_fix copied to clipboard

Fix TypeError

Open PSubutai opened this issue 1 year ago • 0 comments

Problem

The following line gives an error:

elif os.path.isdir(output_file):

The error:

TypeError: _path_isdir: path should be string, bytes, os.PathLike or integer, not NoneType

Solution

Add a guard to ensure output_file is not None before calling os.path.isdir():

elif output_file and os.path.isdir(output_file):

Note

Apologies if I did something wrong. I'm trying to learn how GitHub works, and how to contribute.

PSubutai avatar Nov 15 '25 07:11 PSubutai