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

Redash Dashboard corrupted #1554

Closed
SlippingAway opened this issue Jan 30, 2017 · 2 comments
Closed

Redash Dashboard corrupted #1554

SlippingAway opened this issue Jan 30, 2017 · 2 comments

Comments

@SlippingAway
Copy link

SlippingAway commented Jan 30, 2017

A dashboard has been corrupted and all widgets have been removed. We are using Redash 0.12.0.b2449.

While editing a dashboard, I got an error message saying that someone else was editing the dashboard (I was the only user). The dashboard is blank now, and cannot change the title, add widgets or even archive.

I checked /opt/redash/logs/api_error.log and see this very frequently when I just open the dashboard in screen (tried both in Safari 10.0.2 and Chrome 55.0.2883.95 on a Mac):

[2017-01-30 11:22:16,594][PID:6167][ERROR][redash] Exception on /api/dashboards/user-stats [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python2.7/dist-packages/flask_restful/__init__.py", line 477, in wrapper
    resp = resource(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask_login.py", line 792, in decorated_view
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask/views.py", line 84, in view
    return self.dispatch_request(*args, **kwargs)
  File "/opt/redash/redash.0.12.0.b2449/redash/handlers/base.py", line 25, in dispatch_request
    return super(BaseResource, self).dispatch_request(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask_restful/__init__.py", line 587, in dispatch_request
    resp = meth(*args, **kwargs)
  File "/opt/redash/redash.0.12.0.b2449/redash/permissions.py", line 47, in decorated
    return fn(*args, **kwargs)
  File "/opt/redash/redash.0.12.0.b2449/redash/handlers/dashboards.py", line 47, in get
    response = dashboard.to_dict(with_widgets=True, user=self.current_user)
  File "/opt/redash/redash.0.12.0.b2449/redash/models.py", line 1114, in to_dict
    for widget_id in row:
TypeError: 'NoneType' object is not iterable
[2017-01-30 11:22:16,595][PID:6167][INFO][metrics] method=GET path=/api/dashboards/user-stats endpoint=dashboard status=500 content_type=application/json content_length=36 duration=68.56 query_count=26 query_duration=46.41
[2017-01-30 11:22:16,596][PID:6167][INFO][metrics] method=GET path=/api/dashboards/user-stats endpoint=dashboard status=500 content_type=? content_length=-1 duration=69.72 query_count=26 query_duration=46.41

I managed to remove the dashboard on the admin view.

Update:

Not totally sure how, but I managed to corrupt a second dashboard. It seems that it happens if I add a table as a double-sized widget, and then I add a second table as a regular-sized widget. The moment I edit the dashboard to drag the regular-sized widget on top of the double-sized one, it starts showing error messages.

@arikfr
Copy link
Member

arikfr commented Jan 30, 2017

This was fixed in #1440 (part of the coming v1.0 release), but if you want to fix the dashboard manually for now:

  1. Browser to /admin/dashboard.
  2. Locate the dashboard there.
  3. Edit it and in the layout property remove the nulls. (For example: [null,[34,35],[45]] -> [[34,35],[45]]).

Please reopen if this is a different issue.

@arikfr arikfr closed this as completed Jan 30, 2017
@SlippingAway
Copy link
Author

Thanks for the prompt response!

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

No branches or pull requests

2 participants