MontrealCorpusTools / Montreal-Forced-Aligner

Command line utility for forced alignment using Kaldi
https://montrealcorpustools.github.io/Montreal-Forced-Aligner/
MIT License
1.26k stars 242 forks source link

[BUG] yaml.constructor.ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python/object/apply:pathlib.PosixPath' #794

Closed stefanocoretta closed 2 months ago

stefanocoretta commented 2 months ago

Debugging checklist

[x] Have you read the troubleshooting page (https://montreal-forced-aligner.readthedocs.io/en/latest/user_guide/troubleshooting.html) and searched the documentation to ensure that your issue is not addressed there? [x] Have you updated to latest MFA version (check https://montreal-forced-aligner.readthedocs.io/en/latest/changelog/changelog_3.0.html)? What is the output of mfa version? [ ] Have you tried rerunning the command with the --clean flag?

Describe the issue

Fresh install of mfa on macOS with mamba. When running mfa version after installation, I get this:

mfa version
Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/miniforge/base/envs/mfa/bin/mfa", line 7, in <module>
    from montreal_forced_aligner.command_line.mfa import main
  File "/opt/homebrew/Caskroom/miniforge/base/envs/mfa/lib/python3.10/site-packages/montreal_forced_aligner/__init__.py", line 6, in <module>
    import montreal_forced_aligner.command_line as command_line
  File "/opt/homebrew/Caskroom/miniforge/base/envs/mfa/lib/python3.10/site-packages/montreal_forced_aligner/command_line/__init__.py", line 13, in <module>
    from montreal_forced_aligner.command_line.mfa import create_parser, main
  File "/opt/homebrew/Caskroom/miniforge/base/envs/mfa/lib/python3.10/site-packages/montreal_forced_aligner/command_line/mfa.py", line 18, in <module>
    from montreal_forced_aligner.command_line.model import run_model
  File "/opt/homebrew/Caskroom/miniforge/base/envs/mfa/lib/python3.10/site-packages/montreal_forced_aligner/command_line/model.py", line 8, in <module>
    from montreal_forced_aligner.config import get_temporary_directory
  File "/opt/homebrew/Caskroom/miniforge/base/envs/mfa/lib/python3.10/site-packages/montreal_forced_aligner/config.py", line 228, in <module>
    USE_COLORS = load_global_config().get("terminal_colors", True)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/mfa/lib/python3.10/site-packages/montreal_forced_aligner/config.py", line 221, in load_global_config
    data = yaml.safe_load(f)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/mfa/lib/python3.10/site-packages/yaml/__init__.py", line 125, in safe_load
    return load(stream, SafeLoader)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/mfa/lib/python3.10/site-packages/yaml/__init__.py", line 81, in load
    return loader.get_single_data()
  File "/opt/homebrew/Caskroom/miniforge/base/envs/mfa/lib/python3.10/site-packages/yaml/constructor.py", line 51, in get_single_data
    return self.construct_document(node)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/mfa/lib/python3.10/site-packages/yaml/constructor.py", line 60, in construct_document
    for dummy in generator:
  File "/opt/homebrew/Caskroom/miniforge/base/envs/mfa/lib/python3.10/site-packages/yaml/constructor.py", line 413, in construct_yaml_map
    value = self.construct_mapping(node)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/mfa/lib/python3.10/site-packages/yaml/constructor.py", line 218, in construct_mapping
    return super().construct_mapping(node, deep=deep)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/mfa/lib/python3.10/site-packages/yaml/constructor.py", line 143, in construct_mapping
    value = self.construct_object(value_node, deep=deep)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/mfa/lib/python3.10/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/mfa/lib/python3.10/site-packages/yaml/constructor.py", line 427, in construct_undefined
    raise ConstructorError(None, None,
yaml.constructor.ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python/object/apply:pathlib.PosixPath'
  in "/Users/ste/Documents/MFA/global_config.yaml", line 15, column 22

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

stefanocoretta commented 2 months ago

Never mind, fixed by removing some brew formulae, uninstalling miniforge, cleaning conda config files, reinstalling miniforge...