[ 
https://issues.apache.org/jira/browse/AIRFLOW-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16171707#comment-16171707
 ] 

ASF subversion and git services commented on AIRFLOW-1591:
----------------------------------------------------------

Commit 6e520704f6a5d105c95fcb8e5a7ec06b61e0f002 in incubator-airflow's branch 
refs/heads/master from [~mrkm4ntr]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=6e52070 ]

[AIRFLOW-1591] Avoid attribute error when rendering logging filename

Closes #2578 from mrkm4ntr/airflow-1564


> 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)

Reply via email to