气流:错误:无法识别的参数:网络服务器 [英] airflow: error: unrecognized arguments: webserver

查看:106
本文介绍了气流:错误:无法识别的参数:网络服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试启动气流网络服务器,但是它说这是无法识别的论据

I am trying to start my airflow webserver, but it says it is an unrecognised argument

$ airflow webserver
[2017-05-25 15:06:44,682] {__init__.py:36} INFO - Using executor CeleryExecutor
  ____________       _____________
 ____    |__( )_________  __/__  /________      __
____  /| |_  /__  ___/_  /_ __  /_  __ \_ | /| / /
___  ___ |  / _  /   _  __/ _  / / /_/ /_ |/ |/ /
 _/_/  |_/_/  /_/    /_/    /_/  \____/____/|__/

[2017-05-25 15:06:45,099] {models.py:154} INFO - Filling up the DagBag from /home/ec2-user/airflow/dags
usage: airflow [-h] [-v]
airflow: error: unrecognized arguments: webserver

看到大多数其他参数也被破坏了,我已经尝试重新安装气流:
sudo pip install --upgrade --force-reinstall airflow == 1.7.1.3

Seeing as most of the other arguments are broken too, I have already tried to reinstall airflow: sudo pip install --upgrade --force-reinstall airflow==1.7.1.3

在我决定重新启动它之前,它工作得很好...

It was working just fine until I decided to restart it...

推荐答案

我在写问题的最后一行时就知道了。我重新启动是因为我更新了DAG,在其中添加了 ArgumentParser

I figured it out as I was writing the last line of the question. I was restarting because I updated a DAG, in which, I had added an ArgumentParser

parser = argparse.ArgumentParser()
parser.add_argument(
    '-v', '--verbose',
    help="Print lots of debugging statements",
    action="store_const", dest="loglevel", const=logging.DEBUG,
    default=logging.INFO,
)

显然在气流DAG中是不允许的

Apparently that is not allowed in Airflow DAGs

这篇关于气流:错误:无法识别的参数:网络服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆