chidiwilliams / buzz

Buzz transcribes and translates audio offline on your personal computer. Powered by OpenAI's Whisper.
https://chidiwilliams.github.io/buzz
MIT License
11.95k stars 899 forks source link

can't run newest version #223

Closed eleven-monkey closed 1 year ago

eleven-monkey commented 1 year ago

after install and run it. got this error: image

CCpt5 commented 1 year ago

This seems to have been fixed w/ a commit per: https://github.com/chidiwilliams/buzz/issues/221

However the downloadable files haven't been updated.

I'm getting an error on launch also.

==

Actually maybe not. I "git cherry-picked" the most recent commit and still getting an error.

chidiwilliams commented 1 year ago

@CCpt5 are you still getting the same "NoneType object has no attribute flush" error?

chidiwilliams commented 1 year ago

Do any of these builds work for you?

CCpt5 commented 1 year ago

Not sure I'll be able to try those tonight, but this is the error I am receiving. I also randomly tried GPTChat to see what it though and for kicks I'll attach that:

Traceback (most recent call last): File "main.py", line 37, in <module> os.makedirs(log_dir, exist_ok=True) File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "buzz\gui.py", line 21, in <module> from whisper import tokenizer File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "whisper\__init__.py", line 12, in <module> File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "whisper\decoding.py", line 11, in <module> File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "whisper\tokenizer.py", line 8, in <module> File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "transformers\__init__.py", line 30, in <module> File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "transformers\dependency_versions_check.py", line 17, in <module> File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "transformers\utils\__init__.py", line 34, in <module> File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "transformers\utils\generic.py", line 29, in <module> File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "transformers\utils\import_utils.py", line 37, in <module> File "transformers\utils\logging.py", line 125, in get_logger File "transformers\utils\logging.py", line 88, in _configure_library_root_logger AttributeError: 'NoneType' object has no attribute 'flush'

`Based on the code snippet you provided, it looks like the log_dir variable is defined by calling the user_log_dir function and passing in appname='Buzz' as an argument. This function should return the path to a directory where the logs should be saved.

However, if the user_log_dir function is not defined or is not returning a valid directory path, then the log_dir variable will not be defined correctly and the os.makedirs call on line 37 will fail with the error you are seeing.

To fix this issue, you need to make sure that the user_log_dir function is defined correctly and is returning a valid directory path. You can do this by checking the code of the user_log_dir function and making sure that it is defined correctly and is returning a valid directory path.

I hope this helps! Let me know if you have any other questions.`

This error is caused by trying to create a directory that already exists. The os.makedirs() function will attempt to create all of the necessary directories in the specified path, but if the directory already exists, it will raise a FileExistsError. To fix this error, you can simply change the line of code that is causing the error from this:

It looks like the issue is with the line os.makedirs(user_log_dir, exist_ok=True). The user_log_dir variable is not defined at this point in the code, so os.makedirs doesn't know what directory to create. You should change that line to os.makedirs(log_dir, exist_ok=True), since log_dir is defined earlier and contains the directory you want to create.

CCpt5 commented 1 year ago

Ok, so the one timestamped 12/9/22 7:17am opens w/o an error. I don't have time to test beyond that (almost midnight GF will kill me), but seems good.

Thanks!

chidiwilliams commented 1 year ago

Great, thanks

sonkite225 commented 1 year ago

Do any of these builds work for you?

the first one crashes with same error as before.

the second one works. BUT: the new very high v2 model dont work. it tries to download the model but only dl a 0 byte file and then the program crash close