superset icon indicating copy to clipboard operation
superset copied to clipboard

Import from an earlier version fails if models have moved

Open kvotheyr opened this issue 9 years ago • 2 comments

Superset version - 0.17.1

Steps to reproduce

Import dashboard

This gives the following error. This seems to be working in 0.17.0

  File "/home/ubuntu/venv/local/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/ubuntu/venv/local/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/ubuntu/venv/local/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/ubuntu/venv/local/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/ubuntu/venv/local/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/ubuntu/venv/local/lib/python2.7/site-packages/superset/models/core.py", line 759, in wrapper
    value = f(*args, **kwargs)
  File "/home/ubuntu/venv/local/lib/python2.7/site-packages/superset/views/core.py", line 1025, in import_dashboards
    data = pickle.load(f)
  File "/usr/lib/python2.7/pickle.py", line 1384, in load
    return Unpickler(file).load()
  File "/usr/lib/python2.7/pickle.py", line 864, in load
    dispatch[key](self)
  File "/usr/lib/python2.7/pickle.py", line 1096, in load_global
    klass = self.find_class(module, name)
  File "/usr/lib/python2.7/pickle.py", line 1132, in find_class
    klass = getattr(mod, name)
AttributeError: 'module' object has no attribute 'Dashboard'`

kvotheyr avatar Mar 25 '17 14:03 kvotheyr

I also ran into this issue when exporting dashboards from version 0.17.0 and importing them into 0.17.2 (each version was on a different version). It seems that moving the views into different files / directories causes the pickle import from reconciling the Dashboard object.

We have had to keep the version number consistent between environments in order to get export / import working

jaylindquist avatar Apr 05 '17 20:04 jaylindquist

Notice: this issue has been closed because it has been inactive for 382 days. Feel free to comment and request for this issue to be reopened.

mistercrunch avatar Apr 23 '18 07:04 mistercrunch