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 2019/03/21 13:52:07 UTC

[GitHub] [incubator-superset] elukey opened a new issue #7079: Bubble chart broken in 0.29/0.31 when the bubble size's metric is already used

elukey opened a new issue #7079: Bubble chart broken in 0.29/0.31 when the bubble size's metric is already used
URL: https://github.com/apache/incubator-superset/issues/7079
 
 
   <!--
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at
   
     http://www.apache.org/licenses/LICENSE-2.0
   
   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
   -->
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   
   ### Superset version
   0.29/0.31
   
   A Bubble chart using in its Query section a function(metric) already used elsewhere (like in either X or Y axe) ends up in the following error(s):
   
   ```
   Traceback (most recent call last):
     File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 3078, in get_loc
       return self._engine.get_loc(key)
     File "pandas/_libs/index.pyx", line 140, in pandas._libs.index.IndexEngine.get_loc
     File "pandas/_libs/index.pyx", line 157, in pandas._libs.index.IndexEngine.get_loc
     File "pandas/_libs/index.pyx", line 183, in pandas._libs.index.IndexEngine._get_loc_duplicates
     File "pandas/_libs/index.pyx", line 200, in pandas._libs.index.IndexEngine._maybe_get_bool_indexer
   KeyError: 'x'
   
   During handling of the above exception, another exception occurred:
   
   Traceback (most recent call last):
     File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/pandas/core/internals.py", line 4243, in set
       loc = self.items.get_loc(item)
     File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 3080, in get_loc
       return self._engine.get_loc(self._maybe_cast_indexer(key))
     File "pandas/_libs/index.pyx", line 140, in pandas._libs.index.IndexEngine.get_loc
     File "pandas/_libs/index.pyx", line 157, in pandas._libs.index.IndexEngine.get_loc
     File "pandas/_libs/index.pyx", line 183, in pandas._libs.index.IndexEngine._get_loc_duplicates
     File "pandas/_libs/index.pyx", line 200, in pandas._libs.index.IndexEngine._maybe_get_bool_indexer
   KeyError: 'x'
   
   During handling of the above exception, another exception occurred:
   
   Traceback (most recent call last):
     File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/superset/views/base.py", line 114, in wraps
       return f(self, *args, **kwargs)
     File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/superset/views/core.py", line 1229, in explore_json
       samples=samples,
     File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/superset/views/core.py", line 1160, in generate_json
       payload = viz_obj.get_payload()
     File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/superset/viz.py", line 375, in get_payload
       payload['data'] = self.get_data(df)
     File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/superset/viz.py", line 967, in get_data
       df['x'] = df[[utils.get_metric_name(self.x_metric)]]
     File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/pandas/core/frame.py", line 3119, in __setitem__
       self._set_item(key, value)
     File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/pandas/core/frame.py", line 3195, in _set_item
       NDFrame._set_item(self, key, value)
     File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/pandas/core/generic.py", line 2600, in _set_item
       self._data.set(key, value)
     File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/pandas/core/internals.py", line 4246, in set
       self.insert(len(self.items), item, value)
     File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/pandas/core/internals.py", line 4347, in insert
       placement=slice(loc, loc + 1))
     File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/pandas/core/internals.py", line 3205, in make_block
       return klass(values, ndim=ndim, placement=placement)
     File "/srv/deployment/analytics/superset/venv/lib/python3.7/site-packages/pandas/core/internals.py", line 125, in __init__
       '{mgr}'.format(val=len(self.values), mgr=len(self.mgr_locs)))
   ValueError: Wrong number of items passed 2, placement implies 1
   ```
   
   This seems to be a regression from 0.26, but I wasn't able to track down the origin of the problem. Looks similar to https://github.com/apache/incubator-superset/issues/7006, so I guess it could be related to the pandas/numpy version bump that was done.

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


With regards,
Apache Git Services

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