superset icon indicating copy to clipboard operation
superset copied to clipboard

Unable to use Group by with multiple entries with TIME-SERIES TABLE

Open guoxin-li opened this issue 4 years ago • 12 comments

Issue This issue has been seen in superset 0.26, 0.35, and the latest version of 0.36. When queries with more than one entires of Group by for Time-Series Table, the following error is showing up : Unexpected Error keys must be str, int, float, bool or None, not tuple How to reproduce this Error: Use any available data source to create a TIME-SERIES TABLE, add more than one Group by entries and run query

Trace log Traceback (most recent call last): File "/opt/superset/venv/lib/python3.6/site-packages/superset/views/base.py", line 120, in wraps return f(self, *args, **kwargs) File "/opt/superset/venv/lib/python3.6/site-packages/superset/utils/decorators.py", line 69, in wrapper return f(*args, **kwargs) File "/opt/superset/venv/lib/python3.6/site-packages/superset/views/core.py", line 1092, in explore_json viz_obj, csv=csv, query=query, results=results, samples=samples File "/opt/superset/venv/lib/python3.6/site-packages/superset/views/core.py", line 1014, in generate_json return data_payload_response(*viz_obj.payload_json_and_has_error(payload)) File "/opt/superset/venv/lib/python3.6/site-packages/superset/viz.py", line 478, in payload_json_and_has_error return self.json_dumps(payload), has_error File "/opt/superset/venv/lib/python3.6/site-packages/superset/viz.py", line 470, in json_dumps obj, default=utils.json_int_dttm_ser, ignore_nan=True, sort_keys=sort_keys File "/opt/superset/venv/lib64/python3.6/site-packages/simplejson/_init_.py", line 412, in dumps **kw).encode(obj) File "/opt/superset/venv/lib64/python3.6/site-packages/simplejson/encoder.py", line 296, in encode chunks = self.iterencode(o, _one_shot=True) File "/opt/superset/venv/lib64/python3.6/site-packages/simplejson/encoder.py", line 378, in iterencode return _iterencode(o, 0) TypeError: keys must be str, int, float, bool or None, not tuple

guoxin-li avatar Dec 15 '20 22:12 guoxin-li

@junlincc Please add appropriate tag to this issue. I can reproduce this issue still in v1.1.0 and master.

kamalkeshavani-aiinside avatar May 13 '21 04:05 kamalkeshavani-aiinside

This issue is still exist in v1.3.

tugra-alp avatar Dec 16 '21 11:12 tugra-alp

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 17 '22 20:04 stale[bot]

seen that on 1.4

grzesuav avatar Jul 18 '22 16:07 grzesuav

Still exists in 2.0.1

emgoryaynova avatar Nov 16 '22 16:11 emgoryaynova

yes, still exists in 2.0.1. Any plan to fix

jinyangzhen avatar Dec 01 '22 07:12 jinyangzhen

Also had the same problem with the same error.

The result query runs fine in postgres.

mtrentz avatar May 17 '23 11:05 mtrentz

I see this in 3.0.1 with a time-series table chart.

billcrook avatar Oct 31 '23 17:10 billcrook

This obviously isn't getting much traction, as it doesn't seem to be ruining the day of any core committers. I'm tempted to close it since it's over three years old, but I'm guessing it still exists. Anyone on this thread willing to open a PR?

rusackas avatar Feb 13 '24 21:02 rusackas

It would be cool to fix this error in the time-series table chart.

Aset-21 avatar Apr 02 '24 09:04 Aset-21

still exists in 2.1.3

kyledufrane avatar May 03 '24 21:05 kyledufrane

2.x is no longer supported. We currently support 3.1 and 4.0. Can anyone confirm the issue still exists in supported versions?

rusackas avatar May 06 '24 22:05 rusackas