Incubator-superset: bubble chart - unhashable type: 'dict'

Created on 14 Aug 2019  路  2Comments  路  Source: apache/incubator-superset

In superset trunk a bubble chart seems to be "always" failing with the stacktrace below.
Previous bugs ended up as stale or were referring to missing group-by which is now mandatory in the UI and was filled in my case.
Playing around with the configuration leads to the same error.

Which is the correct way of setting up a bubble chart ?

Screen Shot 2019-08-14 at 01 23 51

Traceback (most recent call last):
File "/home/superset/venvSS/lib/python3.6/site-packages/superset/views/base.py", line 122, in wraps
return f(self, args, *kwargs)
File "/home/superset/venvSS/lib/python3.6/site-packages/superset/utils/decorators.py", line 70, in wrapper
return f(args, *kwargs)
File "/home/superset/venvSS/lib/python3.6/site-packages/superset/views/core.py", line 1097, in explore_json
viz_obj, csv=csv, query=query, results=results, samples=samples
File "/home/superset/venvSS/lib/python3.6/site-packages/superset/views/core.py", line 1018, in generate_json
payload = viz_obj.get_payload()
File "/home/superset/venvSS/lib/python3.6/site-packages/superset/viz.py", line 372, in get_payload
payload = self.get_df_payload(query_obj)
File "/home/superset/venvSS/lib/python3.6/site-packages/superset/viz.py", line 387, in get_df_payload
query_obj = self.query_obj()
File "/home/superset/venvSS/lib/python3.6/site-packages/superset/viz.py", line 969, in query_obj
d["metrics"] = list(set([self.z_metric, self.x_metric, self.y_metric]))
TypeError: unhashable type: 'dict'

#bug

Most helpful comment

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.89. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

All 2 comments

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.89. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Hello! If anyone ends here searching for a solution for error 'unhashable type: 麓dict麓, I have the solution. You should create a metric in your database (Sources --> Tabls --> Edit Record --> Metrics)
image

Once you created the metrics, you can use it in Bubble Chart.
image

Regards,
Martin.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lenguyenthedat picture lenguyenthedat  路  3Comments

deity-bram picture deity-bram  路  3Comments

fly-high-bj picture fly-high-bj  路  3Comments

XiaodiKong picture XiaodiKong  路  3Comments

amien90 picture amien90  路  3Comments