grepthat opened a new issue #11513:
URL: https://github.com/apache/airflow/issues/11513
**Apache Airflow version**: v2.0.0.dev0 (latest master)
**Environment**:
- **OS**: Ubuntu 18.04.4 LTS
- **Others**: Python 3.6.9
**What happened**:
Selecting a task in the the **task instance list**
(*http:localhost:8080/taskinstance/list/*) and **performing an Action** on it
(e.g. *Set state to 'failed'*) yields an error.
Error message:
```
Something bad has happened.
Please consider letting us know by creating a bug report using Github.
Python version: 3.6.12
Airflow version: 2.0.0.dev0
Node: emma
-------------------------------------------------------------------------------
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.6/site-packages/flask/app.py", line
2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/airflow/.local/lib/python3.6/site-packages/flask/app.py", line
1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/airflow/.local/lib/python3.6/site-packages/flask/app.py", line
1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/airflow/.local/lib/python3.6/site-packages/flask/_compat.py",
line 39, in reraise
raise value
File "/home/airflow/.local/lib/python3.6/site-packages/flask/app.py", line
1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/airflow/.local/lib/python3.6/site-packages/flask/app.py", line
1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File
"/home/airflow/.local/lib/python3.6/site-packages/flask_appbuilder/views.py",
line 686, in action_post
self.datamodel.get(self._deserialize_pk_if_composite(pk)) for pk in pks
File
"/home/airflow/.local/lib/python3.6/site-packages/flask_appbuilder/views.py",
line 686, in <listcomp>
self.datamodel.get(self._deserialize_pk_if_composite(pk)) for pk in pks
File
"/home/airflow/.local/lib/python3.6/site-packages/flask_appbuilder/models/sqla/interface.py",
line 870, in get
query, _filters, select_columns=select_columns
File
"/home/airflow/.local/lib/python3.6/site-packages/flask_appbuilder/models/sqla/interface.py",
line 324, in apply_all
select_columns,
File
"/home/airflow/.local/lib/python3.6/site-packages/flask_appbuilder/models/sqla/interface.py",
line 272, in _apply_inner_all
query = self.apply_filters(query, inner_filters)
File
"/home/airflow/.local/lib/python3.6/site-packages/flask_appbuilder/models/sqla/interface.py",
line 162, in apply_filters
return filters.apply_all(query)
File
"/home/airflow/.local/lib/python3.6/site-packages/flask_appbuilder/models/filters.py",
line 295, in apply_all
query = flt.apply(query, value)
File
"/home/airflow/.local/lib/python3.6/site-packages/flask_appbuilder/models/sqla/filters.py",
line 137, in apply
query, field = get_field_setup_query(query, self.model, self.column_name)
File
"/home/airflow/.local/lib/python3.6/site-packages/flask_appbuilder/models/sqla/filters.py",
line 40, in get_field_setup_query
if not hasattr(model, column_name):
TypeError: hasattr(): attribute name must be string
```
**How to reproduce it**:
I wanted to take an Action on a task instance of a DAG with
`schedule_interval=None`. I am attaching a minimal DAG file used for
reproducing this error.
<details>
<summary>DAG file</summary>
```
from airflow import DAG
from datetime import timedelta, datetime
from airflow.operators.bash_operator import BashOperator
dag = DAG(
'simple_dag',
default_args= {
'owner': 'airflow',
'depends_on_past': False,
'retries' : 0,
'start_date': datetime(1970, 1, 1),
'retry_delay': timedelta(seconds=30),
},
description='',
schedule_interval=None,
catchup=False,
)
t1 = BashOperator(
task_id='task1',
bash_command='echo 1',
dag=dag
)
```
</details>
**Anything else we need to know**:
Taking the same Action on the DagRun list
*(http://localhost:8080/dagrun/list)* works.
Great project btw 🙌. Really enjoying using it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]