Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 61BA8200C4D for ; Wed, 5 Apr 2017 19:22:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6064B160B94; Wed, 5 Apr 2017 17:22:46 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A6771160B76 for ; Wed, 5 Apr 2017 19:22:45 +0200 (CEST) Received: (qmail 28217 invoked by uid 500); 5 Apr 2017 17:22:44 -0000 Mailing-List: contact commits-help@airflow.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.incubator.apache.org Delivered-To: mailing list commits@airflow.incubator.apache.org Received: (qmail 28207 invoked by uid 99); 5 Apr 2017 17:22:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Apr 2017 17:22:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 63F411A057D for ; Wed, 5 Apr 2017 17:22:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.201 X-Spam-Level: X-Spam-Status: No, score=-99.201 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id Y9lJxp-L1RqO for ; Wed, 5 Apr 2017 17:22:43 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 73FB35FC7C for ; Wed, 5 Apr 2017 17:22:42 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 063B1E08BB for ; Wed, 5 Apr 2017 17:22:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id B096A263C5 for ; Wed, 5 Apr 2017 17:22:41 +0000 (UTC) Date: Wed, 5 Apr 2017 17:22:41 +0000 (UTC) From: "Bolke de Bruin (JIRA)" To: commits@airflow.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AIRFLOW-1033) TypeError: can't compare datetime.datetime to NoneType in prev_dagrun_dep.py MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 05 Apr 2017 17:22:46 -0000 [ https://issues.apache.org/jira/browse/AIRFLOW-1033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bolke de Bruin updated AIRFLOW-1033: ------------------------------------ Affects Version/s: (was: Airflow 1.8) 1.8.1 > TypeError: can't compare datetime.datetime to NoneType in prev_dagrun_dep.py > ---------------------------------------------------------------------------- > > Key: AIRFLOW-1033 > URL: https://issues.apache.org/jira/browse/AIRFLOW-1033 > Project: Apache Airflow > Issue Type: Bug > Components: DagRun > Affects Versions: 1.8.1 > Environment: Centos 7; > db: PostgreSQL 9.5 > python version: 2.7 > Installation via pip > Reporter: Bert Desmet > Priority: Blocker > Labels: bug, interval > Fix For: 1.8.1 > > Attachments: test_dag.py, test_dag.py.log > > > Dear, > When starting a specific new dag we get the following error: > [2017-03-23 16:51:16,354] {jobs.py:354} DagFileProcessor908 ERROR - Got an exception! Propagating... > Traceback (most recent call last): > File "/usr/lib/python2.7/site-packages/airflow/jobs.py", line 346, in helper > pickle_dags) > File "/usr/lib/python2.7/site-packages/airflow/utils/db.py", line 53, in wrapper > result = func(*args, **kwargs) > File "/usr/lib/python2.7/site-packages/airflow/jobs.py", line 1581, in process_file > self._process_dags(dagbag, dags, ti_keys_to_schedule) > File "/usr/lib/python2.7/site-packages/airflow/jobs.py", line 1174, in _process_dags > self._process_task_instances(dag, tis_out) > File "/usr/lib/python2.7/site-packages/airflow/jobs.py", line 905, in _process_task_instances > session=session): > File "/usr/lib/python2.7/site-packages/airflow/utils/db.py", line 53, in wrapper > result = func(*args, **kwargs) > File "/usr/lib/python2.7/site-packages/airflow/models.py", line 1116, in are_dependencies_met > session=session): > File "/usr/lib/python2.7/site-packages/airflow/models.py", line 1140, in get_failed_dep_statuses > dep_context): > File "/usr/lib/python2.7/site-packages/airflow/ti_deps/deps/base_ti_dep.py", line 94, in get_dep_statuses > for dep_status in self._get_dep_statuses(ti, session, dep_context): > File "/usr/lib/python2.7/site-packages/airflow/ti_deps/deps/prev_dagrun_dep.py", line 47, in _get_dep_statuses > if dag.previous_schedule(ti.execution_date) < ti.task.start_date: > TypeError: can't compare datetime.datetime to NoneType > I have added some debug code to the file 'prev_dagrun_dep.py: > dag = ti.task.dag > print 'Start dates:' > print 'previous_exection_date: %s'%(dag.previous_schedule(ti.execution_date)) > print 'current start date: %s'%(ti.task.start_date) > if dag.catchup: > if dag.previous_schedule(ti.execution_date) < ti.task.start_date: > And this is the output I get: > Start dates: > previous_exection_date: None > current start date: 2017-03-19 00:00:00 > I think it is normall that the previous_exection_date is null, since it is the first time this dag is being run. But why is the start_date of the dag important, and not the start date of the run? > I have the feeling the cause is the 'schedule_interval', which is set to None. > Please find an example and it's log file as an attachment to this mail. > Bert -- This message was sent by Atlassian JIRA (v6.3.15#6346)