Dylan Rajguru created AIRFLOW-1591:
--------------------------------------

             Summary: 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.8.1


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 it's task object.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to