superset icon indicating copy to clipboard operation
superset copied to clipboard

Bug in version v-0.20.5 : Metric names having capital letter like "GMV" is not rendering and throwing error

Open dataneta opened this issue 9 years ago • 6 comments

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

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

Superset version

V-0.20.5 It is proving to be prod-blocker for us.

Expected results

Slices should render and plot graphs

Actual results

Following error is shown whenever we try to plot any graph (such as time series or pie chart) with metric name in capital letterl (such as "Take Rate", "GMV" etc.)

Traceback (most recent call last):
  File "/home/ubuntu/sherlock/lib/python3.5/site-packages/superset/viz.py", line 277, in get_payload
    data = self.get_data(df)
  File "/home/ubuntu/sherlock/lib/python3.5/site-packages/superset/viz.py", line 1036, in get_data
    df = self.process_data(df)
  File "/home/ubuntu/sherlock/lib/python3.5/site-packages/superset/viz.py", line 972, in process_data
    values=fd.get('metrics'))
  File "/home/ubuntu/sherlock/lib/python3.5/site-packages/pandas/core/reshape/pivot.py", line 112, in pivot_table
    raise KeyError(i)
KeyError: 'L2A'

Steps to reproduce

Just change name of metric in capital letter.

dataneta avatar Nov 14 '17 07:11 dataneta

What database is this?

xrmx avatar Nov 14 '17 09:11 xrmx

Underlying database where data is stored is redshift. And backend of SuperSet is Postgersql.

dataneta avatar Nov 14 '17 11:11 dataneta

@xrmx did I answer your question? What could be issue here? Also, I noticed that it doesn't work when metric name is set in Capital Letter. (I set metric name as small and verbose as capital and it worked)

dataneta avatar Nov 15 '17 08:11 dataneta

i have the same issue. The workaround Works correctly tho db: Oracle 10g

vmoranvargas avatar Nov 19 '17 15:11 vmoranvargas

@vmoranvargas what workaround you have applied here?

dataneta avatar Dec 07 '17 07:12 dataneta

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.

stale[bot] avatar Apr 11 '19 05:04 stale[bot]