当我运行该程序时,我收到一条“broken dag no name module slackclient”。我检查了我的代码并设置了我的 slack 帐户。
我也包含了必要的包
from slackclient import SlackClient
from airflow.operators.slack_operator import SlackAPIPostOperator
failed_alert = SlackAPIPostOperator(
task_id='shdfs',
channel="#data",
token="shdfgsdjh324353243brsrbewr3243",
user= 'usr',
text = "hi,this is notification" )
我错过了什么吗?请告诉我。提前致谢!
最佳答案
运行以下命令并安装 slack 依赖项,然后重试。
pip install apache-airflow[slack]
关于python - Airflow - 松弛通知。当我的程序使用 Airflow 失败时,我正在尝试配置松弛通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53098806/