Montreal-Forced-Aligner icon indicating copy to clipboard operation
Montreal-Forced-Aligner copied to clipboard

The global MFA database server does not exist, initializing it first.

Open Tang19999991 opened this issue 1 year ago • 2 comments

The global MFA database server does not exist, initializing it first.

Traceback (most recent call last): File "/home/siying/anaconda3/envs/aligner/bin/mfa", line 8, in sys.exit(mfa_cli()) File "/home/siying/anaconda3/envs/aligner/lib/python3.8/site-packages/click/core.py", line 1130, in call return self.main(*args, **kwargs) File "/home/siying/anaconda3/envs/aligner/lib/python3.8/site-packages/rich_click/rich_group.py", line 21, in main rv = super().main(*args, standalone_mode=False, **kwargs) File "/home/siying/anaconda3/envs/aligner/lib/python3.8/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/home/siying/anaconda3/envs/aligner/lib/python3.8/site-packages/click/core.py", line 1654, in invoke super().invoke(ctx) File "/home/siying/anaconda3/envs/aligner/lib/python3.8/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/siying/anaconda3/envs/aligner/lib/python3.8/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/home/siying/anaconda3/envs/aligner/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, **kwargs) File "/home/siying/anaconda3/envs/aligner/lib/python3.8/site-packages/montreal_forced_aligner/command_line/mfa.py", line 142, in mfa_cli start_server() File "/home/siying/anaconda3/envs/aligner/lib/python3.8/site-packages/montreal_forced_aligner/command_line/utils.py", line 408, in start_server initialize_server() File "/home/siying/anaconda3/envs/aligner/lib/python3.8/site-packages/montreal_forced_aligner/command_line/utils.py", line 308, in initialize_server initdb_proc = subprocess.Popen( File "/home/siying/anaconda3/envs/aligner/lib/python3.8/subprocess.py", line 858, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/home/siying/anaconda3/envs/aligner/lib/python3.8/subprocess.py", line 1704, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'initdb'

This error occurs when I process "mfa align" or "mfa train" command. It seems I need to initialize the aligner but I have no idea what to do...

Tang19999991 avatar Mar 20 '23 19:03 Tang19999991

The usual questions:

  1. What version of MFA are you running? (it appears that it's not 2.2.6 as the error message should have changed and I've been working on issues related to this in recent releases) Can you try upgrading and try again? Can you try running mfa configure --enable_auto_server and then rerunning and see if that addresses it?
  2. What operating system are you using, is this using Docker? I've only seen the lack of initdb be present when trying to build docker images.
  3. How are you invoking MFA? Are you in the conda environment, or invoking the module directly via some python prompt like "python -m montreal_forced_aligner" (which is how I saw this error previously in building the docker image).

mmcauliffe avatar Mar 20 '23 22:03 mmcauliffe

@mmcauliffe I observe the same error when using conda + pip in version 2.2.15. It would be helpful to know where these programs belong, to which pip package/framework, so it can be checked if there are correctly installed. It this belongs to SQLAlchemy or another package?

Fhrozen avatar Jul 31 '23 10:07 Fhrozen