- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
##database 在 apache Airflow 中初始化。
我已经在 linux 中使用 python 3.8 版本安装了 apache Airflow 。在运行 Airflow 命令时,它会显示版本名称。在 Airflow 中初始化数据库时发生错误。解释下面的错误和解决方案,谢谢
/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/sqlalchemy/orm/relationships.py:3463 SAWarning: relationship 'DagRun.serialized_dag' will copy column serialized_dag.dag_id to column dag_run.dag_id, which conflicts with relationship(s): 'TaskInstance.dag_run' (copies task_instance.dag_id to dag_run.dag_id), 'DagRun.task_instances' (copies task_instance.dag_id to dag_run.dag_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards. The 'overlaps' parameter may be used to remove this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx)
/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/sqlalchemy/orm/relationships.py:3463 SAWarning: relationship 'SerializedDagModel.dag_runs' will copy column serialized_dag.dag_id to column dag_run.dag_id, which conflicts with relationship(s): 'TaskInstance.dag_run' (copies task_instance.dag_id to dag_run.dag_id), 'DagRun.task_instances' (copies task_instance.dag_id to dag_run.dag_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards. The 'overlaps' parameter may be used to remove this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx)
____________ _____________
____ |__( )_________ __/__ /________ __
____ /| |_ /__ ___/_ /_ __ /_ __ \_ | /| / /
___ ___ | / _ / _ __/ _ / / /_/ /_ |/ |/ /
_/_/ |_/_/ /_/ /_/ /_/ \____/____/|__/
[2021-04-29 11:50:40,298] {dagbag.py:448} INFO - Filling up the DagBag from /dev/null
[2021-04-29 11:50:40,330] {manager.py:727} WARNING - No user yet created, use flask fab command to do it.
[2021-04-29 11:50:41,340] {abstract.py:229} ERROR - Failed to add operation for GET /api/v1/connections
Traceback (most recent call last):
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/connexion/apis/abstract.py", line 209, in add_paths
self.add_operation(path, method)
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/connexion/apis/abstract.py", line 173, in add_operation
pass_context_arg_name=self.pass_context_arg_name
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/connexion/operations/__init__.py", line 8, in make_operation
return spec.operation_cls.from_spec(spec, *args, **kwargs)
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/connexion/operations/openapi.py", line 138, in from_spec
**kwargs
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/connexion/operations/openapi.py", line 89, in __init__
pass_context_arg_name=pass_context_arg_name
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/connexion/operations/abstract.py", line 96, in __init__
self._resolution = resolver.resolve(self)
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/connexion/resolver.py", line 40, in resolve
return Resolution(self.resolve_function_from_operation_id(operation_id), operation_id)
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/connexion/resolver.py", line 66, in resolve_function_from_operation_id
raise ResolverError(str(e), sys.exc_info())
connexion.exceptions.ResolverError: <ResolverError: columns>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/hduser/apache_airflow/venv/bin/airflow", line 8, in <module>
sys.exit(main())
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/airflow/__main__.py", line 40, in main
args.func(args)
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/airflow/cli/cli_parser.py", line 48, in command
return func(*args, **kwargs)
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/airflow/utils/cli.py", line 89, in wrapper
return f(*args, **kwargs)
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/airflow/cli/commands/webserver_command.py", line 360, in webserver
app = cached_app(None)
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/airflow/www/app.py", line 135, in cached_app
app = create_app(config=config, testing=testing)
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/airflow/www/app.py", line 120, in create_app
init_api_connexion(flask_app)
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/airflow/www/extensions/init_views.py", line 172, in init_api_connexion
specification='v1.yaml', base_path=base_path, validate_responses=True, strict_validation=True
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/connexion/apps/flask_app.py", line 57, in add_api
api = super(FlaskApp, self).add_api(specification, **kwargs)
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/connexion/apps/abstract.py", line 156, in add_api
options=api_options.as_dict())
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/connexion/apis/abstract.py", line 111, in __init__
self.add_paths()
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/connexion/apis/abstract.py", line 216, in add_paths
self._handle_add_operation_error(path, method, err.exc_info)
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/connexion/apis/abstract.py", line 231, in _handle_add_operation_error
raise value.with_traceback(traceback)
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/connexion/resolver.py", line 61, in resolve_function_from_operation_id
return self.function_resolver(operation_id)
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/connexion/utils.py", line 111, in get_function_from_name
module = importlib.import_module(module_name)
File "/home/hduser/apache_airflow/venv/lib64/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/airflow/api_connexion/endpoints/connection_endpoint.py", line 26, in <module>
from airflow.api_connexion.schemas.connection_schema import (
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/airflow/api_connexion/schemas/connection_schema.py", line 42, in <module>
class ConnectionSchema(ConnectionCollectionItemSchema): # pylint: disable=too-many-ancestors
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/marshmallow/schema.py", line 125, in __new__
dict_cls=dict_cls,
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/marshmallow_sqlalchemy/schema/sqlalchemy_schema.py", line 92, in get_declared_fields
fields.update(mcs.get_auto_fields(fields, converter, opts, dict_cls))
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/marshmallow_sqlalchemy/schema/sqlalchemy_schema.py", line 106, in get_auto_fields
for field_name, field in fields.items()
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/marshmallow_sqlalchemy/schema/sqlalchemy_schema.py", line 108, in <dictcomp>
and field_name not in opts.exclude
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/marshmallow_sqlalchemy/schema/sqlalchemy_schema.py", line 28, in create_field
return converter.field_for(model, column_name, **self.field_kwargs)
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/marshmallow_sqlalchemy/convert.py", line 179, in field_for
converted_prop = self.property2field(prop, **kwargs)
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/marshmallow_sqlalchemy/convert.py", line 146, in property2field
field_class = field_class or self._get_field_class_for_property(prop)
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/marshmallow_sqlalchemy/convert.py", line 223, in _get_field_class_for_property
column = prop.columns[0]
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 1220, in __getattr__
return self._fallback_getattr(key)
File "/home/hduser/apache_airflow/venv/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 1194, in _fallback_getattr
raise AttributeError(key)
AttributeError: columns
以上是运行airflow initdb时的错误
最佳答案
这可以通过回滚 SQLAlchemy 的版本来解决。尝试卸载 SQLAlchemy 并安装它的旧版本。我使用了 SQLAlchemy 1.3.20 并且能够让它工作。
关于python-3.x - 在 apache Airflow 中初始化数据库时出错,下面是附加的错误,谢谢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67328545/
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 关于您编写的代码问题的问题必须在问题本身中描述具体问题 — 并且包括有效代码 以重现它。参见 SS
我有一个布局,它有一个 EditText,当用户输入时应该在它下面显示建议。我以编程方式创建了一个 RecyclerView,它应该在 EditText 下面显示建议项目。但是当用户输入时它不显示 R
我正在尝试将 下面各三 s(一个 每三个 s),但是我得到了意想不到的结果。我得出的结论是我必须放一个 低于三分之一 ,但是当我这样做时,它的位置不正确(请参阅演示)。 我正在使用这个 Djan
我知道这个问题已经被问过好几次了,我已经尝试了其他答案中建议的所有方法,但似乎没有任何方法可以使我的 div 位于需要的位置。奇怪的是,一夜之间我的一个 div 想要低于前一个 div。开始时是 fl
好的,我明白了,当离开 .wrapper 时,带有 overflow:hidden 的元素 .wrapper 的所有子元素都会被自然切割的边界框。但这里我只应用了overflow:auto。 是关于下
我有一个元素 The result is ... Test_then 类如下所示: .Test_then::before { content: 'Then'; } 我的目标是让 (The resu
我有一个下拉菜单,它适用于除 IE6 和 IE7 之外的所有内容。 Here it is in the Safari/Firefox browsers Here is how it looks in
我尝试从支持库 13 实现最新的抽屉布局。使用以下代码,抽屉始终显示在 gridview 下方。即使我尝试调用 bringToFront() 仍然无法正常工作。能帮忙看看是什么问题吗?谢谢。 acti
这个问题在这里已经有了答案: using a div to blur an image behind it? [duplicate] (2 个答案) 关闭 7 年前。 我目前正在 Photoshop
我正在阅读一本有关 Java 的书,并发现了以下源代码。 //This example demonstrates how to search multiple occurences of a sear
我想让一个新的/隐藏的 div 从另一个 div 下面滑下来。我的想法是我有一个输入字段和一个添加按钮。单击添加按钮时,会显示更多表单元素(从下方滑出)。这个的形式部分对我的问题并不重要,所以我只让第
我正在制作一种标签栏,其下方有一个指示器,指示选择了哪个标签。我的 View 层次结构非常简单: --------------------------------- |-------------
我什至不知道如何描述这一点,我还在学习,而且还是个新手。 我有一个用于容器的 div。 里面有一个用于菜单的 div 和一个用于内容的 div,两者并排向左浮动。 对于大多数普通内容,它们并排放置。然
我想要一个与浏览器窗口高度相同的 div,以及位于该 div 下方的另一个 div。 我所有的尝试都未能堆叠 div,而是将它们重叠。 我的元素正在尝试的一种天真的实现。 这是我的 fiddle
我正在尝试根据 this codepen 设置联系表单的样式并且 float 表单在其父 div 下面而不是在其中时遇到问题。我试过添加一个 clearfix,但没有成功。我也没有运气就把溢出弄得一团
我是网络开发新手,需要一些帮助来解决这个简单的问题。调整大小时,菜单项会移动到名称下方,有人能告诉我哪里搞砸了吗? 我一直在阅读其他一些解决方案并了解想法,但就是找不到我的错误。 > A
我正在尝试为移动设备开发一个 HTML5 应用程序。布局是非常基本的标题和内容。 标题(红色矩形)、内容(绿色矩形)是绝对 div。如果高度大于屏幕,则内容必须是可滚动的。 当我试图只在橙色矩形 di
我正在尝试将这个 ul 移动到 div 下面,我什至不确定这是否也是完美的方法, 这是代码, HTML User 1
我的处境很复杂。首先,我有两列,当屏幕变小时,它们会在彼此下面。我的问题是在其中一列中我有一个相对的 div。我想要另一个 div 直接在它下面,但它一直与第一个 div 重叠。 这是我的代码:
例如,如果我使用了对齐,如何将一张 table 放在另一张 table 下面。 center_table left_table desired_table
我是一名优秀的程序员,十分优秀!