Hi team, I’m trying to run `meltano invoke airflow...
# troubleshooting
z
Hi team, I’m trying to run
meltano invoke airflow scheduler
and got the following errors:
Copy code
Airflow metadata database could not be initialized: `airflow initdb` failed
More error logs in the 🧵 .Could someone help me with that?
Copy code
File "/Users/gongzibo/meltano-projects/my-meltano-project/.meltano/orchestrators/airflow/venv/bin/airflow", line 8, in <module>
    sys.exit(main())
  File "/Users/gongzibo/meltano-projects/my-meltano-project/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/airflow/__main__.py", line 40, in main
    args.func(args)
  File "/Users/gongzibo/meltano-projects/my-meltano-project/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/airflow/cli/cli_parser.py", line 47, in command
    func = import_string(import_path)
  File "/Users/gongzibo/meltano-projects/my-meltano-project/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/airflow/utils/module_loading.py", line 32, in import_string
    module = import_module(module_path)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/gongzibo/meltano-projects/my-meltano-project/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/airflow/cli/commands/db_command.py", line 24, in <module>
    from airflow.utils import cli as cli_utils, db
  File "/Users/gongzibo/meltano-projects/my-meltano-project/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/airflow/utils/db.py", line 26, in <module>
    from airflow.jobs.base_job import BaseJob  # noqa: F401
  File "/Users/gongzibo/meltano-projects/my-meltano-project/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/airflow/jobs/__init__.py", line 22, in <module>
    import airflow.jobs.scheduler_job  # noqa
  File "/Users/gongzibo/meltano-projects/my-meltano-project/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 34, in <module>
    from setproctitle import setproctitle
ImportError: dlopen(/Users/gongzibo/meltano-projects/my-meltano-project/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/setproctitle.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_Py_GetArgcArgv'

Airflow metadata database could not be initialized: `airflow initdb` failed
BTW, I’m using M1 Mac
p
@zibo_gong I dont have an M1 to reproduce this with but I can confirm that a fresh install with meltano 1.96.0 works for me so I dont think its a generic install bug. @florian.hines I know you have an M1 have you tried reproducing this?
f
I haven't tried 1.96 specifically, but Airflow worked fine with 1.95 on my M1. Let me double check.
seems to work fine for me.
Looks like this might be related to an issue with the default MacOS python install (SO thread from folks with same error). So might be worth trying to setup pyenv and snagging a python install from brew.
z
Got it! Thank you! Could you tell me which python version are you using?
f
Sure! I'm using 3.8.12 - installed via pyenv.
z
Thank you! Let me try that again
f
Ah just realized that my SO links didn't format very well - heres the direct link incase its helpful - https://stackoverflow.com/questions/60684146/airflow-initdb-undefined-symbol-py-getargcargv
z
Great! Python3.8 works for me! Thanks a lot!