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

fix multilayer viz backend error #5649

Merged

Conversation

youngyjd
Copy link
Contributor

@youngyjd youngyjd commented Aug 16, 2018

Multilayers Geoviz is broken on master. Here is the stack trace:

Traceback (most recent call last):
  File "/Users/jundayang/fun/youngyjd-superset/superset/views/core.py", line 1085, in generate_json
    payload = viz_obj.get_payload()
  File "/Users/jundayang/fun/youngyjd-superset/superset/viz.py", line 340, in get_payload
    payload = self.get_df_payload(query_obj)
  File "/Users/jundayang/fun/youngyjd-superset/superset/viz.py", line 355, in get_df_payload
    query_obj = self.query_obj()
  File "/Users/jundayang/fun/youngyjd-superset/superset/viz.py", line 2128, in query_obj
    d = super(BaseDeckGLViz, self).query_obj()
  File "/Users/jundayang/fun/youngyjd-superset/superset/viz.py", line 247, in query_obj
    utils.convert_legacy_filters_into_adhoc(form_data)
  File "/Users/jundayang/fun/youngyjd-superset/superset/utils.py", line 962, in convert_legacy_filters_into_adhoc
    fd['adhoc_filters'].append(to_adhoc(filt, 'SIMPLE', clause))
  File "/Users/jundayang/fun/youngyjd-superset/superset/utils.py", line 726, in to_adhoc
    'comparator': filt['val'],
TypeError: 'NoneType' object is not subscriptable

The example form data sent to backend:

{'color_picker': {'a': 1, 'b': 0, 'g': 255, 'r': 14}, 'datasource': '5__table', 'extruded': True, 'filters': [None], 'granularity_sqla': 'dttm', 'grid_size': 120, 'groupby': [], 'having': '', 'mapbox_style': 'mapbox://styles/mapbox/satellite-streets-v9', 'point_radius': 'Auto', 'point_radius_fixed': {'type': 'fix', 'value': 2000}, 'point_radius_unit': 'Pixels', 'row_limit': 5000, 'size': 'count', 'spatial': {'latCol': 'LAT', 'lonCol': 'LON', 'type': 'latlong'}, 'time_grain_sqla': None, 'time_range': 'No filter', 'viewport': {'bearing': 155.80099696026355, 'latitude': 37.7942314882596, 'longitude': -122.42066918995666, 'pitch': 53.470800300695146, 'zoom': 12.699690845482069}, 'viz_type': 'deck_grid', 'where': '', 'slice_id': 69}

Need to filter out None value from 'filters': [None]

@codecov-io
Copy link

Codecov Report

Merging #5649 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #5649   +/-   ##
======================================
  Coverage    63.5%   63.5%           
======================================
  Files         360     360           
  Lines       22888   22888           
  Branches     2549    2549           
======================================
  Hits        14534   14534           
  Misses       8339    8339           
  Partials       15      15
Impacted Files Coverage Δ
superset/utils.py 89.13% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ff5686...3cd0072. Read the comment docs.

@youngyjd
Copy link
Contributor Author

@mistercrunch mistercrunch merged commit 97acfc7 into apache:master Aug 17, 2018
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.28.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.28.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants