elukey opened a new issue #10956:
URL: https://github.com/apache/incubator-superset/issues/10956


   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](https://user-images.githubusercontent.com/1536240/93614109-032dc100-f9d2-11ea-9198-d69af58186a4.png)
   
   #### 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.
   


----------------------------------------------------------------
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to