Redash version: 5.0.2+b5485
Getting this error when going to the Admin page and clicking on the Edit pencil for query.
Any ideas if this broke in a recent version and is there a fix?
Thanks
Atharva
[2018-11-06 10:32:51,631] ERROR in app: Exception on /admin/query/edit/ [GET]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1641, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask_restful/__init__.py", line 271, in error_router
return original_handler(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1544, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 69, in inner
return self._run_view(f, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 368, in _run_view
return fn(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/flask_admin/model/base.py", line 1999, in edit_view
return_url=return_url)
File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 308, in render
return render_template(template, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 134, in render_template
context, ctx.app)
File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 116, in _render
rv = template.render(context)
File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 989, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 754, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-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 "/usr/local/lib/python2.7/dist-packages/flask_admin/templates/bootstrap3/admin/master.html", line 1, in top-level template code
{% extends admin_base_template %}
File "/usr/local/lib/python2.7/dist-packages/flask_admin/templates/bootstrap3/admin/base.html", line 30, in top-level template code
{% block page_body %}
File "/usr/local/lib/python2.7/dist-packages/flask_admin/templates/bootstrap3/admin/base.html", line 70, in block "page_body"
{% block body %}{% endblock %}
File "/usr/local/lib/python2.7/dist-packages/flask_admin/templates/bootstrap3/admin/model/edit.html", line 32, in block "body"
{% block edit_form %}
File "/usr/local/lib/python2.7/dist-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 "/usr/local/lib/python2.7/dist-packages/flask_admin/templates/bootstrap3/admin/lib.html", line 202, in template
{% call form_tag(action=action) %}
File "/usr/local/lib/python2.7/dist-packages/flask_admin/templates/bootstrap3/admin/lib.html", line 182, in template
{{ caller() }}
File "/usr/local/lib/python2.7/dist-packages/flask_admin/templates/bootstrap3/admin/lib.html", line 203, in template
{{ render_form_fields(form, form_opts=form_opts) }}
File "/usr/local/lib/python2.7/dist-packages/flask_admin/templates/bootstrap3/admin/lib.html", line 175, in template
{{ render_field(form, f, kwargs) }}
File "/usr/local/lib/python2.7/dist-packages/flask_admin/templates/bootstrap3/admin/lib.html", line 130, in template
{{ field(**kwargs)|safe }}
File "/usr/local/lib/python2.7/dist-packages/wtforms/fields/core.py", line 153, in __call__
return self.meta.render_field(self, kwargs)
File "/usr/local/lib/python2.7/dist-packages/wtforms/meta.py", line 56, in render_field
return field.widget(field, **render_kw)
File "/usr/local/lib/python2.7/dist-packages/flask_admin/form/widgets.py", line 28, in __call__
return super(Select2Widget, self).__call__(field, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/wtforms/widgets/core.py", line 287, in __call__
for val, label, selected in field.iter_choices():
File "/usr/local/lib/python2.7/dist-packages/flask_admin/contrib/sqla/fields.py", line 110, in iter_choices
for pk, obj in self._get_object_list():
File "/usr/local/lib/python2.7/dist-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 "/usr/local/lib/python2.7/dist-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