| ERROR | 'NoneType' object has no attribute 'lower'
Closed this issue · 2 comments
YotomiY commented
Describe the bug
I ran the script : python main.py --model medium --tts en-US-EricNeural -> and all was going well until I had this error
| ERROR | 'NoneType' object has no attribute 'lower'
Full error (log)
File "C:\Users\User\Help\Whisper-TikTok\main.py", line 547, in <module>
loop.run_until_complete(main())
File "C:\Users\User\anaconda3\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\User\Help\Whisper-TikTok\main.py", line 209, in main
highlight_words(srt_filename, subtitle_format=args.sub_format,
File "C:\Users\User\Help\Whisper-TikTok\main.py", line 431, in highlight_words
subtitle_format = subtitle_format.lower()
^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'lower'
- OS: Windows
- No GPU
Additional context
I'm loving this project!!
YotomiY commented
I solve It:
if subtitle_format is not None:
subtitle_format = subtitle_format.lower()
MatteoFasulo commented
I solve It:
if subtitle_format is not None: subtitle_format = subtitle_format.lower()
Hi, thx for also reporting the solution.
I will make a small change to the main script introducing a default parameter for the CLI argument which is causing the issue.
I am glad to hear that you are enjoying the project!
~ Matteo