airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Sloan (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AIRFLOW-2257) ValueError from flask-admin causing Charts feature to break
Date Tue, 27 Mar 2018 13:13:00 GMT
Brian Sloan created AIRFLOW-2257:
------------------------------------

             Summary: ValueError from flask-admin causing Charts feature to break
                 Key: AIRFLOW-2257
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2257
             Project: Apache Airflow
          Issue Type: Bug
          Components: dependencies, ui
    Affects Versions: 1.9.0
            Reporter: Brian Sloan


Using Airflow 1.9 and RDS PostgreSQL for the metadata database.

This bug may be related to this flask-admin / sqlalchemy issue: https://github.com/flask-admin/flask-admin/issues/1588

To reproduce, go to "Data Profiling –> Charts" and click the Edit icon to edit any chart.
I get an HTTP 500 with this traceback:
{code:java}
Traceback (most recent call last):
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask/app.py", line 1988, in wsgi_app
    response = self.full_dispatch_request()
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask/app.py", line 1641, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask/app.py", line 1544, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask/app.py", line 1639, in full_dispatch_request
    rv = self.dispatch_request()
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask/app.py", line 1625, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask_admin/base.py", line 69,
in inner
    return self._run_view(f, *args, **kwargs)
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask_admin/base.py", line 368,
in _run_view
    return fn(self, *args, **kwargs)
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask_admin/model/base.py", line
1999, in edit_view
    return_url=return_url)
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask_admin/base.py", line 308,
in render
    return render_template(template, **kwargs)
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask/templating.py", line 134,
in render_template
    context, ctx.app)
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask/templating.py", line 116,
in _render
    rv = template.render(context)
  File "/var/airflow/env/local/lib/python2.7/site-packages/jinja2/environment.py", line 989,
in render
    return self.environment.handle_exception(exc_info, True)
  File "/var/airflow/env/local/lib/python2.7/site-packages/jinja2/environment.py", line 754,
in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/var/airflow/env/local/lib/python2.7/site-packages/airflow/www/templates/airflow/chart/edit.html",
line 18, in top-level template code
    {% extends 'admin/model/edit.html' %}
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask_admin/templates/bootstrap3/admin/model/edit.html",
line 3, in top-level template code
    {% from 'admin/lib.html' import extra with context %} {# backward compatible #}
  File "/var/airflow/env/local/lib/python2.7/site-packages/airflow/www/templates/admin/master.html",
line 18, in top-level template code
    {% extends 'admin/base.html' %}
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask_admin/templates/bootstrap3/admin/base.html",
line 30, in top-level template code
    {% block page_body %}
  File "/var/airflow/env/local/lib/python2.7/site-packages/airflow/www/templates/admin/master.html",
line 104, in block "page_body"
    {% block body %}
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask_admin/templates/bootstrap3/admin/model/edit.html",
line 32, in block "body"
    {% block edit_form %}
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask_admin/templates/bootstrap3/admin/model/edit.html",
line 33, in block "edit_form"
    {{ lib.render_form(form, return_url, extra(), form_opts) }}
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask_admin/templates/bootstrap3/admin/lib.html",
line 202, in template
    {% call form_tag(action=action) %}
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask_admin/templates/bootstrap3/admin/lib.html",
line 182, in template
    {{ caller() }}
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask_admin/templates/bootstrap3/admin/lib.html",
line 203, in template
    {{ render_form_fields(form, form_opts=form_opts) }}
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask_admin/templates/bootstrap3/admin/lib.html",
line 175, in template
    {{ render_field(form, f, kwargs) }}
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask_admin/templates/bootstrap3/admin/lib.html",
line 130, in template
    {{ field(**kwargs)|safe }}
  File "/var/airflow/env/local/lib/python2.7/site-packages/wtforms/fields/core.py", line 153,
in __call__
    return self.meta.render_field(self, kwargs)
  File "/var/airflow/env/local/lib/python2.7/site-packages/wtforms/meta.py", line 56, in render_field
    return field.widget(field, **render_kw)
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask_admin/form/widgets.py", line
28, in __call__
    return super(Select2Widget, self).__call__(field, **kwargs)
  File "/var/airflow/env/local/lib/python2.7/site-packages/wtforms/widgets/core.py", line
287, in __call__
    for val, label, selected in field.iter_choices():
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask_admin/contrib/sqla/fields.py",
line 110, in iter_choices
    for pk, obj in self._get_object_list():
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask_admin/contrib/sqla/fields.py",
line 103, in _get_object_list
    self._object_list = [(text_type(get_pk(obj)), obj) for obj in query]
  File "/var/airflow/env/local/lib/python2.7/site-packages/flask_admin/contrib/sqla/fields.py",
line 300, in get_pk_from_identity
    cls, key = identity_key(instance=obj)
ValueError: too many values to unpack{code}
 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message