[x] Have you updated to latest MFA version?
[x] Have you tried rerunning the command with the --clean flag?
Describe the issue
At the end of the first alignment pass, I get an error when some files appear to moved or renamed.
[... omitted ...]
File "C:\Users\Tristan\miniconda3\envs\aligner3.0.0a7\Lib\site-packages\montreal_forced_aligner\alignment\multiprocessing.py", line 665, in _run
job.construct_path(self.working_directory, "ali", "ark", dict_id).symlink_to(
File "C:\Users\Tristan\miniconda3\envs\aligner3.0.0a7\Lib\pathlib.py", line 1198, in symlink_to
os.symlink(target, self, target_is_directory)
OSError: [WinError 1314] A required privilege is not held by the client: 'C:\\Users\\Tristan\\Documents\\MFA\\00-test\\alignment\\ali_first_pass.1.3.ark' -> 'C:\\Users\\Tristan\\Documents\\MFA\\00-test\\alignment\\ali.1.3.ark'
I think it's because a symlink command is used on Windows and that's not allowed for non-administrator users. The pathlib::Path.symlink_to()docs say some care has to be taken on Windows:
Make this path a symbolic link to target. Under Windows, target_is_directory must be true (default False) if the link’s target is a directory. Under POSIX, target_is_directory’s value is ignored.
And the os.symlink()docs says that symlinks on Windows 10 and newer require elevated privileges.
The line referenced in the error (multiprocessing.py#669) was updated a month ago when some .symlink_to() lines were added.
Importantly, I do not get this error when I run the aligner as an administrator.
Desktop (please complete the following information):
OS: Windows
Version: 11
MFA 3.0.0.7a
Additional context
Here is the error when I run as a regular user:
INFO Generating alignments...
94% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸━━━━ 349/371 [ 0:00:02 < 0:00:01 , 674 it/s ]
ERROR There was an error in the run, please see the log.
Exception ignored in atexit callback: <bound method ExitHooks.history_save_handler of <montreal_forced_aligner.command_line.mfa.ExitHooks object at 0x000001C72D582390>>
Traceback (most recent call last):
File "C:\Users\Tristan\miniconda3\envs\aligner3.0.0a7\Lib\site-packages\montreal_forced_aligner\command_line\mfa.py", line 107, in history_save_handler
raise self.exception
File "C:\Users\Tristan\miniconda3\envs\aligner3.0.0a7\Scripts\mfa-script.py", line 9, in <module>
sys.exit(mfa_cli())
^^^^^^^^^
File "C:\Users\Tristan\miniconda3\envs\aligner3.0.0a7\Lib\site-packages\click\core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Tristan\miniconda3\envs\aligner3.0.0a7\Lib\site-packages\rich_click\rich_command.py", line 126, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\Tristan\miniconda3\envs\aligner3.0.0a7\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Tristan\miniconda3\envs\aligner3.0.0a7\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Tristan\miniconda3\envs\aligner3.0.0a7\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Tristan\miniconda3\envs\aligner3.0.0a7\Lib\site-packages\click\decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Tristan\miniconda3\envs\aligner3.0.0a7\Lib\site-packages\montreal_forced_aligner\command_line\align.py", line 122, in align_corpus_cli
aligner.align()
File "C:\Users\Tristan\miniconda3\envs\aligner3.0.0a7\Lib\site-packages\montreal_forced_aligner\alignment\pretrained.py", line 334, in align
super().align()
File "C:\Users\Tristan\miniconda3\envs\aligner3.0.0a7\Lib\site-packages\montreal_forced_aligner\alignment\base.py", line 368, in align
self.align_utterances()
File "C:\Users\Tristan\miniconda3\envs\aligner3.0.0a7\Lib\site-packages\montreal_forced_aligner\alignment\mixins.py", line 306, in align_utterances
for utterance, log_likelihood in run_kaldi_function(
File "C:\Users\Tristan\miniconda3\envs\aligner3.0.0a7\Lib\site-packages\montreal_forced_aligner\utils.py", line 654, in run_kaldi_function
raise v
File "C:\Users\Tristan\miniconda3\envs\aligner3.0.0a7\Lib\site-packages\montreal_forced_aligner\utils.py", line 538, in run
self.function.run()
File "C:\Users\Tristan\miniconda3\envs\aligner3.0.0a7\Lib\site-packages\montreal_forced_aligner\abc.py", line 86, in run
raise MultiprocessingError(self.job_name, error_text)
montreal_forced_aligner.exceptions.MultiprocessingError: MultiprocessingError:
Job 3 encountered an error:
Traceback (most recent call last):
File "C:\Users\Tristan\miniconda3\envs\aligner3.0.0a7\Lib\site-packages\montreal_forced_aligner\abc.py", line 82, in run
self._run()
File "C:\Users\Tristan\miniconda3\envs\aligner3.0.0a7\Lib\site-packages\montreal_forced_aligner\alignment\multiprocessing.py", line 665, in _run
job.construct_path(self.working_directory, "ali", "ark", dict_id).symlink_to(
File "C:\Users\Tristan\miniconda3\envs\aligner3.0.0a7\Lib\pathlib.py", line 1198, in symlink_to
os.symlink(target, self, target_is_directory)
OSError: [WinError 1314] A required privilege is not held by the client: 'C:\\Users\\Tristan\\Documents\\MFA\\00-test\\alignment\\ali_first_pass.1.3.ark' -> 'C:\\Users\\Tristan\\Documents\\MFA\\00-test\\alignment\\ali.1.3.ark'
In Microsoft Terminal, I can open up the Miniconda terminal as administrator, and then the alignments succeed.
INFO Exporting alignment TextGrids to 00-align-arpa-1-default...
93% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸━━━━━ 345/371 [ 0:00:03 < 0:00:01 , 245 it/s ]
INFO Finished exporting TextGrids to 00-align-arpa-1-default!
INFO Done! Everything took 91.708 seconds
I also enabled the Developer Mode in Windows 11, and the alignment succeed with a regular user account.
Debugging checklist
[x] Have you updated to latest MFA version? [x] Have you tried rerunning the command with the
--clean
flag?Describe the issue
At the end of the first alignment pass, I get an error when some files appear to moved or renamed.
I think it's because a symlink command is used on Windows and that's not allowed for non-administrator users. The
pathlib::Path.symlink_to()
docs say some care has to be taken on Windows:And the
os.symlink()
docs says that symlinks on Windows 10 and newer require elevated privileges.The line referenced in the error (multiprocessing.py#669) was updated a month ago when some
.symlink_to()
lines were added.Importantly, I do not get this error when I run the aligner as an administrator.
For Reproducing your issue
Here is the command.
Log file
[See command outputs below.]
Desktop (please complete the following information):
Additional context
Here is the error when I run as a regular user:
In Microsoft Terminal, I can open up the Miniconda terminal as administrator, and then the alignments succeed.
I also enabled the Developer Mode in Windows 11, and the alignment succeed with a regular user account.