Traceback (most recent call last):
File "to_srt.py", line 97, in
main()
File "to_srt.py", line 94, in main
f.write(to_srt(text))
File "to_srt.py", line 69, in to_srt
append_subs(prev_time["start"], prev_time["end"], prev_content, fmt_t)
File "to_srt.py", line 25, in append_subs
"start_time": convert_time(start) if format_time else start,
File "to_srt.py", line 13, in convert_time
ms = leading_zeros(int(raw_time[:-4]) % 1000, 3)
ValueError: invalid literal for int() with base 10: ''
Hi @rakochi, thanks for the fix. Could you please add an example that crashed before? Something similar to an input sample and the corresponding output sample would suffice.
Error was the following:
Traceback (most recent call last): File "to_srt.py", line 97, in
main()
File "to_srt.py", line 94, in main
f.write(to_srt(text))
File "to_srt.py", line 69, in to_srt
append_subs(prev_time["start"], prev_time["end"], prev_content, fmt_t)
File "to_srt.py", line 25, in append_subs
"start_time": convert_time(start) if format_time else start,
File "to_srt.py", line 13, in convert_time
ms = leading_zeros(int(raw_time[:-4]) % 1000, 3)
ValueError: invalid literal for int() with base 10: ''