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

HTTP 500 + stacktrace regression (from 0.36 to 0.37.1) #10956

Closed
3 tasks
elukey opened this issue Sep 18, 2020 · 1 comment · Fixed by #10964
Closed
3 tasks

HTTP 500 + stacktrace regression (from 0.36 to 0.37.1) #10956

elukey opened this issue Sep 18, 2020 · 1 comment · Fixed by #10964
Assignees
Labels
!deprecated-label:bug Deprecated label - Use #bug instead

Comments

@elukey
Copy link
Contributor

elukey commented Sep 18, 2020

Hi all,

after upgrading from 0.36 to 0.37.1, one of our dashboard returns the following HTTP 500:

Sorry, something went wrong
500 - Internal Server Error
Stacktrace
        Traceback (most recent call last):
  File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/flask_appbuilder/security/decorators.py", line 109, in wraps
    return f(self, *args, **kwargs)
  File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/superset/views/core.py", line 1616, in dashboard
    for datasource, slices in datasources.items()
  File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/superset/views/core.py", line 1616, in <dictcomp>
    for datasource, slices in datasources.items()
  File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/superset/connectors/base/models.py", line 287, in data_for_slices
    metric_names.add(utils.get_metric_name(metric))
TypeError: unhashable type: 'dict'

After a chat with @villebro the issue seems to be related to utils.get_metric_name, that does not return the metric label only but the whole metric dictionary (is_adhoc_metric seems not behaving as expected).

Expected results

The dashboard correctly displayed

Actual results

The above 500.

Screenshots

Screen Shot 2020-09-18 at 5 11 17 PM

How to reproduce the bug

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Environment

(please complete the following information):

  • superset version: 0.37.1
  • python version: 3.7
  • node.js version: node -v
  • npm version: npm -v

Checklist

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 there are 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.

Additional context

Add any other context about the problem here.

@elukey elukey added the !deprecated-label:bug Deprecated label - Use #bug instead label Sep 18, 2020
@villebro villebro self-assigned this Sep 18, 2020
@villebro
Copy link
Member

Thanks @elukey , I was able to repro, will post a PR shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
!deprecated-label:bug Deprecated label - Use #bug instead
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants