Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to execute script 'main' due to unhandled exception: 'NoneType' object has no attribute 'write #1073

Closed
chrisyixz opened this issue Feb 7, 2025 · 2 comments
Labels
needs info Additional information is needed

Comments

@chrisyixz
Copy link

on win11 x64

Traceback (most recent call last):
File "multiprocessing\process.py", line 314, in _bootstrap
File "multiprocessing\process.py", line 108, in run
File "buzz\transcriber\whisper_file_transcriber.py", line 105, in transcribe_whisper
File "buzz\transcriber\whisper_file_transcriber.py", line 208, in transcribe_openai_whisper
File "stable_whisper\whisper_word_level\original_whisper.py", line 482, in transcribe_stable
File "stable_whisper\whisper_word_level\original_whisper.py", line 314, in detect_language
File "tqdm\std.py", line 722, in write
AttributeError: 'NoneType' object has no attribute 'write'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 4, in
File "buzz\buzz.py", line 38, in main
File "PyInstaller\hooks\rthooks\pyi_rth_multiprocessing.py", line 50, in _freeze_support
File "multiprocessing\spawn.py", line 122, in spawn_main
File "multiprocessing\spawn.py", line 135, in _main
File "multiprocessing\process.py", line 329, in _bootstrap
AttributeError: 'NoneType' object has no attribute 'write'

@raivisdejus
Copy link
Collaborator

The 'NoneType' object has no attribute 'write' happens when something was wrong in running the whisper library.

Errors seems to indicate that something failed during language detection. You can try specifying the language you are transcribing.

Also does this happen on all audio files or only some? And what transcription model size was used?

In an unlikely case of some corruption in model file you can try to delete it in the Preferences and re-download.

@raivisdejus raivisdejus added the needs info Additional information is needed label Feb 7, 2025
@raivisdejus
Copy link
Collaborator

@chrisyixz Seems language detection failed. A workaround for situations like this is to specify the language to transcribe to.

Whisper should not fail even if the language is not specified. As a crash obviously happened, it would be useful to know what settings were used and maybe also get the audio file to replicate the issue.

Will close the issue for now, but if you can provide additional information, I would be happy to investigate this further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info Additional information is needed
Projects
None yet
Development

No branches or pull requests

2 participants