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

ValueError: mutable default <class 'collections.deque'> for field hotword_chunks is not allowed: use default_factory #6

Closed
goldyfruit opened this issue Apr 22, 2023 · 1 comment · Fixed by #7

Comments

@goldyfruit
Copy link
Member

When I try to start ovos-dinkum-listener this is what I got:

2023-04-22 17:56:27.123 - OVOS - ovos_config.models:load_local:105 - DEBUG - Configuration /home/ovos/.venv/lib/python3.11/site-packages/mycroft/configuration/mycroft.conf loaded
2023-04-22 17:56:27.376 - OVOS - ovos_config.models:load_local:111 - DEBUG - Configuration '/etc/mycroft/mycroft.conf' not defined, skipping
2023-04-22 17:56:27.625 - OVOS - ovos_config.models:load_local:105 - DEBUG - Configuration /home/ovos/.config/mycroft/web_cache.json loaded
2023-04-22 17:56:27.899 - OVOS - ovos_config.models:load_local:105 - DEBUG - Configuration /home/ovos/.config/mycroft/mycroft.conf loaded
2023-04-22 17:56:28.136 - OVOS - ovos_config.models:load_local:111 - DEBUG - Configuration '/etc/xdg/mycroft/mycroft.conf' not defined, skipping
2023-04-22 17:56:28.373 - OVOS - ovos_config.models:load_local:111 - DEBUG - Configuration '/home/ovos/.mycroft/mycroft.conf' not defined, skipping
2023-04-22 17:56:28.768 - OVOS - ovos_utils.configuration:get_xdg_config_save_path:141 - WARNING - configuration moved to the `ovos_config` package. This submodule will be removed in ovos_utils 0.1.0
2023-04-22 17:56:28.893 - OVOS - ovos_utils.configuration:get_xdg_base:76 - WARNING - configuration moved to the `ovos_config` package. This submodule will be removed in ovos_utils 0.1.0
Traceback (most recent call last):
  File "/home/ovos/.venv/bin/ovos-dinkum-listener", line 5, in <module>
    from ovos_dinkum_listener.__main__ import main
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_dinkum_listener/__main__.py", line 40, in <module>
    from ovos_dinkum_listener.voice_loop import AlsaMicrophone, DinkumVoiceLoop, ListeningMode, ListeningState
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_dinkum_listener/voice_loop/__init__.py", line 16, in <module>
    from ovos_dinkum_listener.voice_loop.voice_loop import DinkumVoiceLoop, ListeningMode, ListeningState
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_dinkum_listener/voice_loop/voice_loop.py", line 98, in <module>
    @dataclass
     ^^^^^^^^^
  File "/usr/lib/python3.11/dataclasses.py", line 1220, in dataclass
    return wrap(cls)
           ^^^^^^^^^
  File "/usr/lib/python3.11/dataclasses.py", line 1210, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/dataclasses.py", line 958, in _process_class
    cls_fields.append(_get_field(cls, name, type, kw_only))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/dataclasses.py", line 815, in _get_field
    raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'collections.deque'> for field hotword_chunks is not allowed: use default_factory
@goldyfruit
Copy link
Member Author

Tested, the error doesn't appear anymore.

@github-actions github-actions bot mentioned this issue Jun 5, 2023
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

Successfully merging a pull request may close this issue.

1 participant