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 D7311200CF7 for ; Tue, 19 Sep 2017 15:35:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D60351609DB; Tue, 19 Sep 2017 13:35:06 +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 26FD01609E0 for ; Tue, 19 Sep 2017 15:35:06 +0200 (CEST) Received: (qmail 49168 invoked by uid 500); 19 Sep 2017 13:35:05 -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 49158 invoked by uid 99); 19 Sep 2017 13:35:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Sep 2017 13:35:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id B8535183B01 for ; Tue, 19 Sep 2017 13:35:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id J8f8lCdZLqO5 for ; Tue, 19 Sep 2017 13:35:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 467CA60D3F for ; Tue, 19 Sep 2017 13:35:02 +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 37304E0F67 for ; Tue, 19 Sep 2017 13:35:01 +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 8E9AF24519 for ; Tue, 19 Sep 2017 13:35:00 +0000 (UTC) Date: Tue, 19 Sep 2017 13:35:00 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: commits@airflow.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AIRFLOW-1591) Exception: 'TaskInstance' object has no attribute 'task' - when trying to view logs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 19 Sep 2017 13:35:07 -0000 [ https://issues.apache.org/jira/browse/AIRFLOW-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16171708#comment-16171708 ] ASF subversion and git services commented on AIRFLOW-1591: ---------------------------------------------------------- Commit f4653ec92bd962f20100ab246096f03da11f5e03 in incubator-airflow's branch refs/heads/v1-9-test from [~mrkm4ntr] [ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=f4653ec ] [AIRFLOW-1591] Avoid attribute error when rendering logging filename Closes #2578 from mrkm4ntr/airflow-1564 (cherry picked from commit 6e520704f6a5d105c95fcb8e5a7ec06b61e0f002) Signed-off-by: Bolke de Bruin > Exception: 'TaskInstance' object has no attribute 'task' - when trying to view logs > ----------------------------------------------------------------------------------- > > Key: AIRFLOW-1591 > URL: https://issues.apache.org/jira/browse/AIRFLOW-1591 > Project: Apache Airflow > Issue Type: Bug > Components: webapp > Affects Versions: Airflow 1.8 > Reporter: Dylan Rajguru > Assignee: Dylan Rajguru > Fix For: 1.9.0 > > > Getting an exception when trying to view task logs in the web ui: > Traceback (most recent call last): > File "/Users/dy001ra/git/incubator-airflow/airflow/www/views.py", line 725, in log > logs = handler.read(ti) > File "/Users/dy001ra/git/incubator-airflow/airflow/utils/log/file_task_handler.py", line 148, in read > logs[i] += self._read(task_instance, try_number) > File "/Users/dy001ra/git/incubator-airflow/airflow/utils/log/file_task_handler.py", line 91, in _read > log_relative_path = self._render_filename(ti, try_number + 1) > File "/Users/dy001ra/git/incubator-airflow/airflow/utils/log/file_task_handler.py", line 71, in _render_filename > jinja_context = ti.get_template_context() > File "/Users/dy001ra/git/incubator-airflow/airflow/utils/db.py", line 48, in wrapper > result = func(*args, **kwargs) > File "/Users/dy001ra/git/incubator-airflow/airflow/models.py", line 1551, in get_template_context > task = self.task > AttributeError: 'TaskInstance' object has no attribute 'task' > From looking through the code it appears that the logging file_task_handler expects the TaskInstance to contain a reference to its task object. -- This message was sent by Atlassian JIRA (v6.4.14#64029)