Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting slices alphabetically results in 500 - Internal Server Error #3673

Closed
3 tasks done
SeanPreusse opened this issue Oct 15, 2017 · 6 comments
Closed
3 tasks done
Labels
inactive Inactive for >= 30 days

Comments

@SeanPreusse
Copy link

SeanPreusse commented Oct 15, 2017

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if any
  • I have reproduced the issue with at least the latest released version of superset
  • I have checked the issue tracker for the same issue and I haven't found one similar

Superset version

Latest Version

Expected results

Sorting slice alphabetically

Actual results

500 - Internal Server Error

Steps to reproduce

Click on 'Slices', next to the slice title, click on the up/down arrow to sort.

@xrmx
Copy link
Contributor

xrmx commented Oct 15, 2017

What version is latest version? Also post the stacktrace you had in the logs.

@SeanPreusse
Copy link
Author

SeanPreusse commented Oct 15, 2017

version 20.4.

**Stacktrace**
   Traceback (most recent call last):
  File "/home/ubuntu/virtualenvs/superset/local/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/ubuntu/virtualenvs/superset/local/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/ubuntu/virtualenvs/superset/local/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/ubuntu/virtualenvs/superset/local/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/ubuntu/virtualenvs/superset/local/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/ubuntu/virtualenvs/superset/local/lib/python2.7/site-packages/flask_appbuilder/security/decorators.py", line 26, in wraps
    return f(self, *args, **kwargs)
  File "/home/ubuntu/virtualenvs/superset/local/lib/python2.7/site-packages/flask_appbuilder/views.py", line 475, in list
    widgets = self._list()
  File "/home/ubuntu/virtualenvs/superset/local/lib/python2.7/site-packages/flask_appbuilder/baseviews.py", line 877, in _list
    page_size=page_size)
  File "/home/ubuntu/virtualenvs/superset/local/lib/python2.7/site-packages/flask_appbuilder/baseviews.py", line 791, in _get_list_widget
    count, lst = self.datamodel.query(joined_filters, order_column, order_direction, page=page, page_size=page_size)
  File "/home/ubuntu/virtualenvs/superset/local/lib/python2.7/site-packages/flask_appbuilder/models/sqla/interface.py", line 109, in query
    order_direction=order_direction)
  File "/home/ubuntu/virtualenvs/superset/local/lib/python2.7/site-packages/flask_appbuilder/models/sqla/interface.py", line 71, in _get_base_query
    query = query.order_by(self._get_attr(order_column).asc())
AttributeError: 'property' object has no attribute 'asc'

@timifasubaa
Copy link
Contributor

related: dpgaspar/Flask-AppBuilder#610

@BigFaceFish
Copy link

I've also got the same error on version 0.20.4

Sorry, something went wrong

500 - Internal Server Error

Stacktrace

     Traceback (most recent call last):

File "/root/venv/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/root/venv/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/root/venv/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/root/venv/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/root/venv/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functionsrule.endpoint
File "/root/venv/lib/python2.7/site-packages/flask_appbuilder/security/decorators.py", line 26, in wraps
return f(self, *args, **kwargs)
File "/root/venv/lib/python2.7/site-packages/flask_appbuilder/views.py", line 475, in list
widgets = self._list()
File "/root/venv/lib/python2.7/site-packages/flask_appbuilder/baseviews.py", line 877, in _list
page_size=page_size)
File "/root/venv/lib/python2.7/site-packages/flask_appbuilder/baseviews.py", line 791, in _get_list_widget
count, lst = self.datamodel.query(joined_filters, order_column, order_direction, page=page, page_size=page_size)
File "/root/venv/lib/python2.7/site-packages/flask_appbuilder/models/sqla/interface.py", line 109, in query
order_direction=order_direction)
File "/root/venv/lib/python2.7/site-packages/flask_appbuilder/models/sqla/interface.py", line 73, in _get_base_query
query = query.order_by(self._get_attr(order_column).desc())
AttributeError: 'property' object has no attribute 'desc'

@mistercrunch
Copy link
Member

Warning: this issue has been inactive for 182 days and will be automatically closed on 2018-05-01 if there is no further activity. You can add the keepup label to the issue in order for this bot to keep it open.

@stale
Copy link

stale bot commented Apr 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactive Inactive for >= 30 days
Projects
None yet
Development

No branches or pull requests

5 participants