You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Aizhamal Nurmamat kyzy (JIRA)" <ji...@apache.org> on 2019/05/18 03:14:06 UTC
[jira] [Updated] (AIRFLOW-1591) Exception: 'TaskInstance' object
has no attribute 'task' - when trying to view logs
[ https://issues.apache.org/jira/browse/AIRFLOW-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aizhamal Nurmamat kyzy updated AIRFLOW-1591:
--------------------------------------------
Labels: webapp (was: )
Component/s: (was: webapp)
ui
Moving to ui component as part of component refactor. Webapp component will be removed.
> 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: ui
> Affects Versions: 1.8.0
> Reporter: Dylan Rajguru
> Assignee: Dylan Rajguru
> Priority: Major
> Labels: webapp
> 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
(v7.6.3#76005)