本文介绍了无法设置气流,在“启动气流数据库"时出错.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
无法设置气流,在启动气流数据库"时出错.我收到以下错误:
Not able to setup airflow, getting error while "Initiating Airflow Database" . I am getting the below error:
File "/Library/Frameworks/Python.framework/Versions/3.8/bin/airflow", line 26, in <module>
from airflow.bin.cli import CLIFactory
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/airflow/bin/cli.py", line 79, in <module>
api_module = import_module(conf.get('cli', 'api_client')) # type: Any
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/airflow/api/client/local_client.py", line 24, in <module>
from airflow.api.common.experimental import delete_dag
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/airflow/api/common/experimental/delete_dag.py", line 25, in <module>
from airflow.models.serialized_dag import SerializedDagModel
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/airflow/models/serialized_dag.py", line 32, in <module>
from airflow.serialization.serialized_objects import SerializedDAG
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/airflow/serialization/serialized_objects.py", line 28, in <module>
import cattr
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/cattr/__init__.py", line 2, in <module>
from .converters import Converter, UnstructureStrategy
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/cattr/converters.py", line 3, in <module>
from ._compat import (
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/cattr/_compat.py", line 86, in <module>
from typing import _Union
ImportError: cannot import name '_Union' from 'typing' (/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/typing.py)
与路径有关吗?
推荐答案
这是 cattrs
中的一个错误,使用Python 3.8,未解决的问题:"> https://github.com/Tinche/cattrs/issues/46
This is a bug in cattrs
with Python 3.8, open issue: https://github.com/Tinche/cattrs/issues/46
我建议使用Python 3.7
I would suggest using Python 3.7
这篇关于无法设置气流,在“启动气流数据库"时出错.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!