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

Unhashable type: 'dict' with paired t-test chart #7056

Closed
3 tasks done
ghost opened this issue Mar 19, 2019 · 1 comment · Fixed by #7076
Closed
3 tasks done

Unhashable type: 'dict' with paired t-test chart #7056

ghost opened this issue Mar 19, 2019 · 1 comment · Fixed by #7076
Labels
!deprecated-label:bug Deprecated label - Use #bug instead

Comments

@ghost
Copy link

ghost commented Mar 19, 2019

  • 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.

Superset version

0.29.0rc7 (latest pypi version)

Expected results

Chart should display the results correctly.

Actual results

I'm getting the following error if not count(*) metric is used.

Screen Shot 2019-03-19 at 10 19 51

I can see this error message in the logs

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/superset/views/base.py", line 96, in wraps
    return f(self, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/superset/views/core.py", line 1211, in explore_json
    samples=samples,
  File "/usr/local/lib/python3.6/site-packages/superset/views/core.py", line 1142, in generate_json
    payload = viz_obj.get_payload()
  File "/usr/local/lib/python3.6/site-packages/superset/viz.py", line 374, in get_payload
    payload['data'] = self.get_data(df)
  File "/usr/local/lib/python3.6/site-packages/superset/viz.py", line 2532, in get_data
    values=metrics)
  File "/usr/local/lib/python3.6/site-packages/pandas/core/frame.py", line 5303, in pivot_table
    margins_name=margins_name)
  File "/usr/local/lib/python3.6/site-packages/pandas/core/reshape/pivot.py", line 60, in pivot_table
    if i not in data:
  File "/usr/local/lib/python3.6/site-packages/pandas/core/generic.py", line 1519, in __contains__
    return key in self._info_axis
  File "/usr/local/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 2021, in __contains__
    hash(key)
TypeError: unhashable type: 'dict'

Steps to reproduce

  • Install superset, load sample data as given in the installation guide
  • Create a paired t-test chart with any source and choose any metric except count(*)
  • Run Query
@kristw kristw added !deprecated-label:bug Deprecated label - Use #bug instead .vis labels Mar 19, 2019
mistercrunch added a commit to mistercrunch/superset that referenced this issue Mar 21, 2019
@ghost
Copy link
Author

ghost commented Apr 20, 2019

Hi. Sorry for the late response. I checked your fix and although now this error is fixed, it generates a new one which seems to be frontend related.
Screen Shot 2019-04-17 at 10 29 03
I checked the logs and I can see the following error message:

Uncaught TypeError: Cannot read property 'map' of undefined
    at ProxyComponent.o [as render] (webpack-internal:///./node_modules/@superset-ui/legacy-plugin-chart-paired-t-test/esm/TTestTable.js:36)
    at ProxyComponent.hotComponentRender (webpack-internal:///./node_modules/react-hot-loader/dist/react-hot-loader.development.js:728)
    at ProxyComponent.proxiedRender (webpack-internal:///./node_modules/react-hot-loader/dist/react-hot-loader.development.js:748)
    at finishClassComponent (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:14301)
    at updateClassComponent (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:14264)
    at beginWork (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:15082)
    at performUnitOfWork (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:17820)
    at workLoop (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:17860)
    at HTMLUnknownElement.callCallback (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:149)
    at Object.invokeGuardedCallbackDev (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:199)

Do you have any idea what can cause this issue?

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.

1 participant