You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/06/15 22:28:29 UTC

[GitHub] [incubator-superset] med4it opened a new issue #10058: KeyError when setting TimeRange

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


   I get the KeyError once I set the `Time Range` on any visualization.
   Datasource used is Clickhouse.
   
   Stacktrace : 
   ```
   INFO:superset.connectors.sqla.models:SELECT subcategory AS subcategory, COUNT(*) AS count
   FROM ecom.tillnow
   WHERE event_time >= toDateTime('2020-06-14 17:00:00') AND event_time < toDateTime('2020-06-15 00:00:00') GROUP BY subcategory ORDER BY count DESC
    LIMIT 50000
   DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): clickhouse:8123
   DEBUG:urllib3.connectionpool:http://clickhouse:8123 "POST / HTTP/1.1" 200 None
   DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): clickhouse:8123
   DEBUG:urllib3.connectionpool:http://clickhouse:8123 "POST /?database=default HTTP/1.1" 200 None
   DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): clickhouse:8123
   DEBUG:urllib3.connectionpool:http://clickhouse:8123 "POST /?database=default HTTP/1.1" 200 None
   DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): clickhouse:8123
   DEBUG:urllib3.connectionpool:http://clickhouse:8123 "POST /?query_id=2d2b6f18-af52-11ea-9d6a-0242c0a87003&database=default HTTP/1.1" 200 None
   Caching 741 chars at key b229be20a1606d62cddbe69a8d1c97cd
   INFO:superset.viz:Caching 741 chars at key b229be20a1606d62cddbe69a8d1c97cd
   'subcategory'
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/site-packages/superset/views/base.py", line 124, in wraps
       return f(self, *args, **kwargs)
     File "/usr/local/lib/python3.6/site-packages/superset/utils/decorators.py", line 70, in wrapper
       return f(*args, **kwargs)
     File "/usr/local/lib/python3.6/site-packages/superset/views/core.py", line 717, in explore_json
       viz_obj, csv=csv, query=query, results=results, samples=samples
     File "/usr/local/lib/python3.6/site-packages/superset/views/core.py", line 639, in generate_json
       payload = viz_obj.get_payload()
     File "/usr/local/lib/python3.6/site-packages/superset/viz.py", line 406, in get_payload
       payload["data"] = self.get_data(df)
     File "/usr/local/lib/python3.6/site-packages/superset/viz.py", line 2874, in get_data
       levels = self.levels_for("agg_sum", groups, df)
     File "/usr/local/lib/python3.6/site-packages/superset/viz.py", line 2756, in levels_for
       agg_df = df.groupby(groups[:i]) if i else df
     File "/usr/local/lib/python3.6/site-packages/pandas/core/generic.py", line 7894, in groupby
       **kwargs
     File "/usr/local/lib/python3.6/site-packages/pandas/core/groupby/groupby.py", line 2522, in groupby
       return klass(obj, by, **kwds)
     File "/usr/local/lib/python3.6/site-packages/pandas/core/groupby/groupby.py", line 391, in __init__
       mutated=self.mutated,
     File "/usr/local/lib/python3.6/site-packages/pandas/core/groupby/grouper.py", line 621, in _get_grouper
       raise KeyError(gpr)
   KeyError: 'subcategory'
   ERROR:superset.views.base:'subcategory'
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/site-packages/superset/views/base.py", line 124, in wraps
       return f(self, *args, **kwargs)
     File "/usr/local/lib/python3.6/site-packages/superset/utils/decorators.py", line 70, in wrapper
       return f(*args, **kwargs)
     File "/usr/local/lib/python3.6/site-packages/superset/views/core.py", line 717, in explore_json
       viz_obj, csv=csv, query=query, results=results, samples=samples
     File "/usr/local/lib/python3.6/site-packages/superset/views/core.py", line 639, in generate_json
       payload = viz_obj.get_payload()
     File "/usr/local/lib/python3.6/site-packages/superset/viz.py", line 406, in get_payload
       payload["data"] = self.get_data(df)
     File "/usr/local/lib/python3.6/site-packages/superset/viz.py", line 2874, in get_data
       levels = self.levels_for("agg_sum", groups, df)
     File "/usr/local/lib/python3.6/site-packages/superset/viz.py", line 2756, in levels_for
       agg_df = df.groupby(groups[:i]) if i else df
     File "/usr/local/lib/python3.6/site-packages/pandas/core/generic.py", line 7894, in groupby
       **kwargs
     File "/usr/local/lib/python3.6/site-packages/pandas/core/groupby/groupby.py", line 2522, in groupby
       return klass(obj, by, **kwds)
     File "/usr/local/lib/python3.6/site-packages/pandas/core/groupby/groupby.py", line 391, in __init__
       mutated=self.mutated,
     File "/usr/local/lib/python3.6/site-packages/pandas/core/groupby/grouper.py", line 621, in _get_grouper
       raise KeyError(gpr)
   KeyError: 'subcategory'
   ```


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] issue-label-bot[bot] commented on issue #10058: KeyError when setting TimeRange

Posted by GitBox <gi...@apache.org>.
issue-label-bot[bot] commented on issue #10058:
URL: https://github.com/apache/incubator-superset/issues/10058#issuecomment-644422314


   Issue-Label Bot is automatically applying the label `#bug` to this issue, with a confidence of 0.96. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback! 
   
    Links: [app homepage](https://github.com/marketplace/issue-label-bot), [dashboard](https://mlbot.net/data/apache/incubator-superset) and [code](https://github.com/hamelsmu/MLapp) for this bot.


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] stale[bot] commented on issue #10058: KeyError when setting TimeRange

Posted by GitBox <gi...@apache.org>.
stale[bot] commented on issue #10058:
URL: https://github.com/apache/incubator-superset/issues/10058#issuecomment-678835173


   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.
   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] stale[bot] closed issue #10058: KeyError when setting TimeRange

Posted by GitBox <gi...@apache.org>.
stale[bot] closed issue #10058:
URL: https://github.com/apache/incubator-superset/issues/10058


   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] willbarrett commented on issue #10058: KeyError when setting TimeRange

Posted by GitBox <gi...@apache.org>.
willbarrett commented on issue #10058:
URL: https://github.com/apache/incubator-superset/issues/10058#issuecomment-649110112


   @med4it what is your Superset version?


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org