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

Unhandled exception in script while downloading a hugginface model #940

Closed
plenet10 opened this issue Oct 10, 2024 · 1 comment
Closed

Comments

@plenet10
Copy link

When trying to download a model from Hugging Face specifically: golesheed/whisper-5-dutch
Looking at the error itself it looks like it tries to make the connection to the model using a wrong path:
'https://huggingface.co/C:\Users\Plene\AppData\Local\Buzz\Buzz\Cache\models\models--golesheed--whisper-5-dutch\snapshots\3c8721bc5d739653b7baeb98ead33e479635931a/tree/None'

Buzz 1.1.0 gives an error:
Failed to execute script 'main' due to unhandled exception: 'NoneType' object has no attribute 'write'

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 97, in transcribe_whisper
  File "buzz\transcriber\whisper_file_transcriber.py", line 122, in transcribe_hugging_face
  File "buzz\transformers_whisper.py", line 170, in transcribe
  File "transformers\models\auto\auto_factory.py", line 523, in from_pretrained
    config, kwargs = AutoConfig.from_pretrained(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "transformers\models\auto\configuration_auto.py", line 1138, in from_pretrained
    config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "transformers\configuration_utils.py", line 631, in get_config_dict
    config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "transformers\configuration_utils.py", line 686, in _get_config_dict
    resolved_config_file = cached_file(
                           ^^^^^^^^^^^^
  File "transformers\utils\hub.py", line 369, in cached_file
    raise EnvironmentError(
OSError: C:\Users\Plene\AppData\Local\Buzz\Buzz\Cache\models\models--golesheed--whisper-5-dutch\snapshots\3c8721bc5d739653b7baeb98ead33e479635931a does not appear to have a file named config.json. Checkout 'https://huggingface.co/C:\Users\Plene\AppData\Local\Buzz\Buzz\Cache\models\models--golesheed--whisper-5-dutch\snapshots\3c8721bc5d739653b7baeb98ead33e479635931a/tree/None' for available files.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 4, in <module>
  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'

OS: Windows 10 Home 22H2 19045.5011
PC specs:
CPU: Intel(R) Core(TM) i7-9750H CPU
GPU: Nvidea GEFORCE GTX 1660 TI Max-Q | Driver 560.94 Game Ready Driver

Please let me know if more info is needed

@raivisdejus
Copy link
Collaborator

Fixed model type detection. Next version if Buzz will have this working.

If you want to try it out you can get the latest development build.

  1. Log into Github
  2. Get the latest development build here https://github.com/chidiwilliams/buzz/actions/workflows/ci.yml?query=branch%3Amain

You will also get support for Nvidia GPUs that has been added since last release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants