You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Li Xuanji (JIRA)" <ji...@apache.org> on 2016/07/28 04:42:20 UTC
[jira] [Created] (AIRFLOW-376) TypeError("Boolean value of this
clause is not defined")
Li Xuanji created AIRFLOW-376:
---------------------------------
Summary: TypeError("Boolean value of this clause is not defined")
Key: AIRFLOW-376
URL: https://issues.apache.org/jira/browse/AIRFLOW-376
Project: Apache Airflow
Issue Type: Bug
Reporter: Li Xuanji
Assignee: Li Xuanji
Priority: Minor
With this dag,
```
from airflow import DAG
from airflow.operators.bash_operator import BashOperator
from datetime import datetime, timedelta
default_args = {
'owner': 'airflow',
'depends_on_past': False,
'start_date': datetime(2016, 1, 1, 1, 0),
'email': ['xuanji@gmail.com'],
'email_on_failure': True,
'email_on_retry': False,
'retries': 3,
'retry_delay': timedelta(minutes=1),
}
dag = DAG('bash_bash_bash', default_args=default_args)
# t1, t2 and t3 are examples of tasks created by instatiating operators
t1 = BashOperator(
task_id='print_date',
bash_command='date',
dag=dag)
t2 = BashOperator(
task_id='sleep',
bash_command='sleep 5',
retries=3,
dag=dag)
templated_command = """
{% for i in range(5) %}
echo "{{ ds }}"
echo "{{ macros.ds_add(ds, 7)}}"
echo "{{ params.my_param }}"
{% endfor %}
"""
t3 = BashOperator(
task_id='templated',
bash_command=templated_command,
params={'my_param': 'Parameter I passed in'},
dag=dag)
t2.set_upstream(t1)
t3.set_upstream(t1)
```
I get an error while running the scheduler
```
[2016-07-27 21:40:57,468] {jobs.py:669} ERROR - Boolean value of this clause is not defined
Traceback (most recent call last):
File "/Users/xuanji_li/tools/zodiac-airflow/airflow/jobs.py", line 667, in _do_dags
self.manage_slas(dag)
File "/Users/xuanji_li/tools/zodiac-airflow/airflow/utils/db.py", line 53, in wrapper
result = func(*args, **kwargs)
File "/Users/xuanji_li/tools/zodiac-airflow/airflow/jobs.py", line 299, in manage_slas
.filter(SlaMiss.email_sent.is_(False) or SlaMiss.notification_sent.is_(False))
File "/Library/Python/2.7/site-packages/sqlalchemy/sql/elements.py", line 2760, in __bool__
raise TypeError("Boolean value of this clause is not defined")
TypeError: Boolean value of this clause is not defined
```
Mainly opening this to remind myself to take a look at it
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)