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

[BUG] #649

Open
mfaytak opened this issue Jun 8, 2023 · 1 comment
Open

[BUG] #649

mfaytak opened this issue Jun 8, 2023 · 1 comment
Assignees
Labels

Comments

@mfaytak
Copy link

mfaytak commented Jun 8, 2023

Debugging checklist

[ x ] Have you updated to latest MFA version?
[ x ] Have you tried rerunning the command with the --clean flag?

Describe the issue

mfa validate fails on run - traceback ends on ImportError relating to sqlite.

(base) ansible@ansibles-MacBook-Pro mfa % mfa validate ./kom-corpus kom.dict --clean
The global MFA database server does not exist, initializing it first.
waiting for server to start.... done
server started
 ERROR    There was an error in the run, please see the log.                                                                                                        
 INFO     Stopping the global MFA database server...                                                                                                                
Exception ignored in atexit callback: <bound method ExitHooks.history_save_handler of <montreal_forced_aligner.command_line.mfa.ExitHooks object at 0x104961300>>
Traceback (most recent call last):
  File "/Users/ansible/miniconda3/lib/python3.10/site-packages/montreal_forced_aligner/command_line/mfa.py", line 97, in history_save_handler
    raise self.exception
  File "/Users/ansible/miniconda3/bin/mfa", line 10, in <module>
    sys.exit(mfa_cli())
  File "/Users/ansible/miniconda3/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/Users/ansible/miniconda3/lib/python3.10/site-packages/rich_click/rich_group.py", line 21, in main
    rv = super().main(*args, standalone_mode=False, **kwargs)
  File "/Users/ansible/miniconda3/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/Users/ansible/miniconda3/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/ansible/miniconda3/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/ansible/miniconda3/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/Users/ansible/miniconda3/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/ansible/miniconda3/lib/python3.10/site-packages/montreal_forced_aligner/command_line/validate.py", line 113, in validate_corpus_cli
    validator.validate()
  File "/Users/ansible/miniconda3/lib/python3.10/site-packages/montreal_forced_aligner/validation/corpus_validator.py", line 595, in validate
    self.setup()
  File "/Users/ansible/miniconda3/lib/python3.10/site-packages/montreal_forced_aligner/validation/corpus_validator.py", line 539, in setup
    self.initialize_database()
  File "/Users/ansible/miniconda3/lib/python3.10/site-packages/montreal_forced_aligner/abc.py", line 285, in initialize_database
    MfaSqlBase.metadata.create_all(self.db_engine)
  File "/Users/ansible/miniconda3/lib/python3.10/site-packages/montreal_forced_aligner/abc.py", line 291, in db_engine
    self._db_engine = self.construct_engine()
  File "/Users/ansible/miniconda3/lib/python3.10/site-packages/montreal_forced_aligner/abc.py", line 388, in construct_engine
    e = sqlalchemy.create_engine(
  File "<string>", line 2, in create_engine
  File "/Users/ansible/miniconda3/lib/python3.10/site-packages/sqlalchemy/util/deprecations.py", line 283, in warned
    return fn(*args, **kwargs)  # type: ignore[no-any-return]
  File "/Users/ansible/miniconda3/lib/python3.10/site-packages/sqlalchemy/engine/create.py", line 601, in create_engine
    dbapi = dbapi_meth(**dbapi_args)
  File "/Users/ansible/miniconda3/lib/python3.10/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 505, in import_dbapi
    from sqlite3 import dbapi2 as sqlite
  File "/Users/ansible/miniconda3/lib/python3.10/sqlite3/__init__.py", line 57, in <module>
    from sqlite3.dbapi2 import *
  File "/Users/ansible/miniconda3/lib/python3.10/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ImportError: dlopen(/Users/ansible/miniconda3/lib/python3.10/lib-dynload/_sqlite3.cpython-310-darwin.so, 0x0002): Symbol not found: _sqlite3_enable_load_extension
  Referenced from: <2EB36E11-2537-3C25-9AE5-22D0DE8AFB9B> /Users/ansible/miniconda3/lib/python3.10/lib-dynload/_sqlite3.cpython-310-darwin.so
  Expected in:     <710E4989-2656-3774-8114-0C2936A8FC33> /usr/lib/libsqlite3.dylib

For Reproducing your issue
Please fill out the following:

  1. Corpus structure
    • What language is the corpus in? Kom
    • How many files/speakers? 17 speakers, 27 files
    • Are you using lab files or TextGrid files for input? TextGrid
  2. Dictionary
    • Are you using a dictionary from MFA? If so, which one? Self-made custom
    • If it's a custom dictionary, what is the phoneset? i i0 e eh a a0 o u ɨ ɨ0 ae oe ue ay ey oy uy ɨy zɨ vɨ b nb m nm f nf w nw t nt d nd s ns n nn l nl ch nch j nj y nny k nk g ng ŋ gh '
  3. Acoustic model
    • If you're using an acoustic model, is it one download through MFA? If so, which one? n/a, aiming to train one.
    • If it's a model you've trained, what data was it trained on? n/a

Log file
Please attach the log file for the run that encountered an error (by default these will be stored in ~/Documents/MFA).

pg_log_global.txt

Desktop (please complete the following information):

  • OS: [e.g. Windows, OSX, Linux] Mac OS
  • Version [e.g. MacOSX 10.15, Ubuntu 20.04, Windows 10, etc] 13.4
  • Any other details about the setup (Cloud, Docker, etc) conda install

Additional context

Error encountered immediately after installing merged-in updates from #648

@mfaytak
Copy link
Author

mfaytak commented Jun 8, 2023

For anyone encountering this error, the fix suggested here, to add --use_postgres --auto_server, does provide a workaround to this bug (mfa validate successfully runs when these are appended).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants