MahmoudAshraf97 / whisper-diarization

Automatic Speech Recognition with Speaker Diarization based on OpenAI Whisper
BSD 2-Clause "Simplified" License
3.28k stars 272 forks source link

ValueError: mutable default for field override_dirname is not allowed: use default_factory #47

Closed robinwithes closed 1 year ago

robinwithes commented 1 year ago

Traceback (most recent call last):
  File "C:\Users\gamen\Downloads\whisper-diarization-main\diarize.py", line 9, in <module>
    from nemo.collections.asr.models.msdd_models import NeuralDiarizer
  File "C:\Python311\Lib\site-packages\nemo\collections\asr\__init__.py", line 15, in <module>
    from nemo.collections.asr import data, losses, models, modules
  File "C:\Python311\Lib\site-packages\nemo\collections\asr\losses\__init__.py", line 15, in <module>
    from nemo.collections.asr.losses.angularloss import AngularSoftmaxLoss
  File "C:\Python311\Lib\site-packages\nemo\collections\asr\losses\angularloss.py", line 18, in <module>
    from nemo.core.classes import Loss, Typing, typecheck
  File "C:\Python311\Lib\site-packages\nemo\core\__init__.py", line 16, in <module>
    from nemo.core.classes import *
  File "C:\Python311\Lib\site-packages\nemo\core\classes\__init__.py", line 16, in <module>
    import hydra
  File "C:\Python311\Lib\site-packages\hydra\__init__.py", line 5, in <module>
    from hydra import utils
  File "C:\Python311\Lib\site-packages\hydra\utils.py", line 8, in <module>
    import hydra._internal.instantiate._instantiate2
  File "C:\Python311\Lib\site-packages\hydra\_internal\instantiate\_instantiate2.py", line 12, in <module>
    from hydra._internal.utils import _locate
  File "C:\Python311\Lib\site-packages\hydra\_internal\utils.py", line 18, in <module>
    from hydra.core.utils import get_valid_filename, validate_config_path
  File "C:\Python311\Lib\site-packages\hydra\core\utils.py", line 20, in <module>
    from hydra.core.hydra_config import HydraConfig
  File "C:\Python311\Lib\site-packages\hydra\core\hydra_config.py", line 6, in <module>
    from hydra.conf import HydraConf
  File "C:\Python311\Lib\site-packages\hydra\conf\__init__.py", line 46, in <module>
    class JobConf:
  File "C:\Python311\Lib\site-packages\hydra\conf\__init__.py", line 75, in JobConf
    @dataclass
     ^^^^^^^^^
  File "C:\Python311\Lib\dataclasses.py", line 1221, in dataclass
    return wrap(cls)
           ^^^^^^^^^
  File "C:\Python311\Lib\dataclasses.py", line 1211, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\dataclasses.py", line 959, in _process_class
    cls_fields.append(_get_field(cls, name, type, kw_only))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\dataclasses.py", line 816, in _get_field
    raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'hydra.conf.JobConf.JobConfig.OverrideDirname'> for field override_dirname is not allowed: use default_factory```
andrehafner commented 1 year ago

same error for me here too, any hints? Also running on windows like the above.

rmchale commented 1 year ago

Running on M1 Mac. Any suggestions?

andrehafner commented 1 year ago

it's a python 3.11 issue with one of the libraries. drop to 3.10 and it should work.

MahmoudAshraf97 commented 1 year ago

Python 3.11 seems to be causing problems with nemo, downgrade and it should be fine