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

Cannot Get to Slices Page after Bad Slice Data Edit (tried to add new property to hide scroll bars) #3507

Closed
3 tasks done
Todd-Z-Li opened this issue Sep 20, 2017 · 4 comments · Fixed by #3720
Closed
3 tasks done

Comments

@Todd-Z-Li
Copy link

Todd-Z-Li commented Sep 20, 2017

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

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

Superset version

0.18.5

Expected results

List of Slices

Actual results


         Traceback (most recent call last):
  File "/home/pi/venv/lib/python3.5/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/venv/lib/python3.5/site-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/venv/lib/python3.5/site-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/venv/lib/python3.5/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/home/pi/venv/lib/python3.5/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/venv/lib/python3.5/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/pi/venv/lib/python3.5/site-packages/flask_appbuilder/security/decorators.py", line 26, in wraps
    return f(self, *args, **kwargs)
  File "/home/pi/venv/lib/python3.5/site-packages/flask_appbuilder/views.py", line 478, in list
    widgets=widgets)
  File "/home/pi/venv/lib/python3.5/site-packages/flask_appbuilder/baseviews.py", line 158, in render_template
    return render_template(template, **dict(list(kwargs.items()) + list(self.extra_args.items())))
  File "/home/pi/venv/lib/python3.5/site-packages/flask/templating.py", line 134, in render_template
    context, ctx.app)
  File "/home/pi/venv/lib/python3.5/site-packages/flask/templating.py", line 116, in _render
    rv = template.render(context)
  File "/home/pi/venv/lib/python3.5/site-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/home/pi/venv/lib/python3.5/site-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/venv/lib/python3.5/site-packages/jinja2/_compat.py", line 37, in reraise
    raise value.with_traceback(tb)
  File "/home/pi/venv/lib/python3.5/site-packages/superset/templates/appbuilder/general/model/list.html", line 2, in top-level template code
    {% import 'appbuilder/general/lib.html' as lib %}
  File "/home/pi/venv/lib/python3.5/site-packages/flask_appbuilder/templates/appbuilder/base.html", line 1, in top-level template code
    {% extends base_template %}
  File "/home/pi/venv/lib/python3.5/site-packages/superset/templates/superset/base.html", line 1, in top-level template code
    {% extends "appbuilder/baselayout.html" %}
  File "/home/pi/venv/lib/python3.5/site-packages/superset/templates/appbuilder/baselayout.html", line 2, in top-level template code
    {% import 'appbuilder/baselib.html' as baselib %}
  File "/home/pi/venv/lib/python3.5/site-packages/flask_appbuilder/templates/appbuilder/init.html", line 46, in top-level template code
    {% block body %}
  File "/home/pi/venv/lib/python3.5/site-packages/superset/templates/appbuilder/baselayout.html", line 21, in block "body"
    {% block content %}
  File "/home/pi/venv/lib/python3.5/site-packages/superset/templates/appbuilder/general/model/list.html", line 12, in block "content"
    {% block list_list scoped %}
  File "/home/pi/venv/lib/python3.5/site-packages/superset/templates/appbuilder/general/model/list.html", line 13, in block "list_list"
    {{ widgets.get('list')()|safe }}
  File "/home/pi/venv/lib/python3.5/site-packages/flask_appbuilder/widgets.py", line 34, in __call__
    return template.render(args)
  File "/home/pi/venv/lib/python3.5/site-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/home/pi/venv/lib/python3.5/site-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/venv/lib/python3.5/site-packages/jinja2/_compat.py", line 37, in reraise
    raise value.with_traceback(tb)
  File "/home/pi/venv/lib/python3.5/site-packages/flask_appbuilder/templates/appbuilder/general/widgets/list.html", line 2, in top-level template code
    {% extends 'appbuilder/general/widgets/base_list.html' %}
  File "/home/pi/venv/lib/python3.5/site-packages/superset/templates/appbuilder/general/widgets/base_list.html", line 25, in top-level template code
    {% block begin_loop_values %}
  File "/home/pi/venv/lib/python3.5/site-packages/flask_appbuilder/templates/appbuilder/general/widgets/list.html", line 45, in block "begin_loop_values"
    {% for item in value_columns %}
  File "/home/pi/venv/lib/python3.5/site-packages/jinja2/runtime.py", line 410, in __init__
    self._after = self._safe_next()
  File "/home/pi/venv/lib/python3.5/site-packages/jinja2/runtime.py", line 430, in _safe_next
    return next(self._iterator)
  File "/home/pi/venv/lib/python3.5/site-packages/flask_appbuilder/models/base.py", line 114, in get_values
    retdict[col] = self._get_attr_value(item, col)
  File "/home/pi/venv/lib/python3.5/site-packages/flask_appbuilder/models/base.py", line 58, in _get_attr_value
    if not hasattr(item, col):
  File "/home/pi/venv/lib/python3.5/site-packages/superset/models/core.py", line 214, in slice_link
    url = self.slice_url
  File "/home/pi/venv/lib/python3.5/site-packages/superset/models/core.py", line 200, in slice_url
    obj=self, params=parse.quote(json.dumps(self.form_data))))
  File "/home/pi/venv/lib/python3.5/site-packages/superset/models/core.py", line 184, in form_data
    form_data = json.loads(self.params)
  File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.5/json/decoder.py", line 355, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 933 (char 932)

Steps to reproduce

Edit a Slice's property with an unknown property (I added overflow:hidden) in the object of list of properties. I can no longer open the /slicemodelview/list/ or view any slices information at all at any other pages that link to slices (such as trying to add a slice from a dashboard)

@emmadickson
Copy link

I'm having this same problem. How did you get the slice deleted I can't even navigate to the page anymore.

@Todd-Z-Li
Copy link
Author

no solution other than reinstall (so far)

@Todd-Z-Li
Copy link
Author

@emmadickson solution (sort of):

find the editor for the slice's properties manually, at this URL:
localhost:8088/slicemodelview/edit/###

where the "###" is the designated number for your chart. You probably won't remember what it is, but if it is near the first few you've created (and after you loaded the examples), then it is probably in the 30s (mine was 37) or 40s

Hope this helps!

mistercrunch added a commit to mistercrunch/superset that referenced this issue Oct 25, 2017
fixes apache#3507

This prevents malformed JSON from getting saved in a slice's params. It
also prevents the issue described in apache#3507 from happening though as a
result malformed slices will render using default control values.
@mistercrunch
Copy link
Member

Thanks for reporting this, I just pushed a fix for it.

mistercrunch added a commit that referenced this issue Oct 26, 2017
fixes #3507

This prevents malformed JSON from getting saved in a slice's params. It
also prevents the issue described in #3507 from happening though as a
result malformed slices will render using default control values.
michellethomas pushed a commit to michellethomas/panoramix that referenced this issue May 24, 2018
fixes apache#3507

This prevents malformed JSON from getting saved in a slice's params. It
also prevents the issue described in apache#3507 from happening though as a
result malformed slices will render using default control values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants