superset icon indicating copy to clipboard operation
superset copied to clipboard

Not able to import dashboard in the latest version of superset

Open syazshafei opened this issue 8 years ago • 25 comments

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 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.999.0dev

Expected results

Actual results

Steps to reproduce

I have two latest superset running on different servers. I exported the dashboard and try to import it into other superset but cannot. Please help me

syazshafei avatar Oct 26 '18 01:10 syazshafei

Both on python 3? Stacktrace?

mistercrunch avatar Oct 26 '18 03:10 mistercrunch

Yes both on python 3. Even I tried to import back into the same superset, I got errors.

These are the errors:

Traceback (most recent call last):
  File "/home/syazwan/anaconda2/envs/jps2018/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/syazwan/anaconda2/envs/jps2018/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/syazwan/anaconda2/envs/jps2018/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/syazwan/anaconda2/envs/jps2018/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/home/syazwan/anaconda2/envs/jps2018/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/syazwan/anaconda2/envs/jps2018/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/syazwan/incubator-superset/superset/models/core.py", line 1037, in wrapper
    value = f(*args, **kwargs)
  File "/home/syazwan/anaconda2/envs/jps2018/lib/python3.6/site-packages/flask_appbuilder/security/decorators.py", line 26, in wraps
    return f(self, *args, **kwargs)
  File "/home/syazwan/incubator-superset/superset/views/core.py", line 1260, in import_dashboards
    dashboard_import_export.import_dashboards(db.session, f.stream)
  File "/home/syazwan/incubator-superset/superset/utils/dashboard_import_export.py", line 22, in import_dashboards
    type(table).import_obj(table, import_time=import_time)
AttributeError: type object 'dict' has no attribute 'import_obj'```

syazshafei avatar Oct 26 '18 03:10 syazshafei

Yes both on python 3. Even I tried to import back into the same superset, I got errors.

These are the errors:

Traceback (most recent call last):
  File "/home/syazwan/anaconda2/envs/jps2018/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/syazwan/anaconda2/envs/jps2018/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/syazwan/anaconda2/envs/jps2018/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/syazwan/anaconda2/envs/jps2018/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/home/syazwan/anaconda2/envs/jps2018/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/syazwan/anaconda2/envs/jps2018/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/syazwan/incubator-superset/superset/models/core.py", line 1037, in wrapper
    value = f(*args, **kwargs)
  File "/home/syazwan/anaconda2/envs/jps2018/lib/python3.6/site-packages/flask_appbuilder/security/decorators.py", line 26, in wraps
    return f(self, *args, **kwargs)
  File "/home/syazwan/incubator-superset/superset/views/core.py", line 1260, in import_dashboards
    dashboard_import_export.import_dashboards(db.session, f.stream)
  File "/home/syazwan/incubator-superset/superset/utils/dashboard_import_export.py", line 22, in import_dashboards
    type(table).import_obj(table, import_time=import_time)
AttributeError: type object 'dict' has no attribute 'import_obj'```

yeah same issue. I have Python 3.6 and latest superset.....

srggrs avatar Nov 09 '18 03:11 srggrs

@mistercrunch so how to fix it?

syazshafei avatar Nov 29 '18 08:11 syazshafei

+1

ReactiveCoreAmar avatar Jan 19 '19 16:01 ReactiveCoreAmar

Same issue with me too

MaheshYadavalli avatar Feb 04 '19 05:02 MaheshYadavalli

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 10 '19 09:04 stale[bot]

same issue here.

pratapsingh avatar Apr 10 '19 13:04 pratapsingh

same issue here.

forestwater avatar Jun 01 '19 02:06 forestwater

so how to fix it? Anybody shine some light on it?

forestwater avatar Jun 01 '19 02:06 forestwater

same issue here.

tuhinsharma121 avatar Jun 06 '19 16:06 tuhinsharma121

There's some work being done on import / export recently, with a new cli utility and improved logic.

mistercrunch avatar Jun 07 '19 05:06 mistercrunch

@mistercrunch is it fixed already? because some dashboards can be imported but some cannot.

syazshafei avatar Jun 27 '19 06:06 syazshafei

Only dashboard with Druid datasources cannot be imported

syazshafei avatar Jul 23 '19 09:07 syazshafei

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

stale[bot] avatar Sep 21 '19 10:09 stale[bot]

Same issue here.

My boss detected it.

Bug's not dead.

paula-everis avatar Oct 21 '19 22:10 paula-everis

Same issue here:

Superset version 0.30.0 Running on Windows10

I wanted to investigate import_dashboards feature to execute DTAP pipeline.

  • I saved as one of the existing dashboards. (named it "testSelcuk" )

  • Then exported this new dashboard as JSON file.

  • Then deleted this dashboard.

  • then typed python import_dashboards -f "path of testSelcuk"

I reveive the error : 2019-10-28 08:30:45,544:ERROR:root:(sqlite3.IntegrityError) UNIQUE constraint failed: tables.table_name [SQL: INSERT INTO tables (created_on, changed_on, description, default_endpoint, is_featured, filter_select_enabled, "offset", cache_timeout, params, perm, table_name, main_dttm_col, database_id, fetch_values_predicate, schema, sql, is_sqllab_view, template_params, created_by_fk, changed_by_fk) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)] [parameters: ('2019-10-28 08:30:45.544436', '2019-10-28 08:30:45.544436', '<!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements. See the NOTICE file\ndistributed with this ... (23651 characters truncated) ... L | Urban population\nSP.URB.TOTL.IN.ZS | Urban population (% of total)\nSP.UWT.TFRT | Unmet need for contraception (% of married women ages 15-49)\n', None, 0, 1, 0, None, '{"remote_id": 2, "database_name": "main", "import_time": 1572247845}', None, 'wb_health_population', 'year', 2, None, None, None, 0, None, None, None)] (Background on this error at: http://sqlalche.me/e/gkpj

Untitled )

arslanselcuk avatar Oct 28 '19 07:10 arslanselcuk

Any updates here please? Getting the same error.

ITNoesis avatar Aug 07 '20 22:08 ITNoesis

I was getting the same error but I found a way to avoid it by manually changing the server addresses in the dashboard json. The dashboard got imported without an error, but related charts still didn't get created. Maybe I needed to change some more things in the json?

RishiDas001 avatar Sep 19 '20 06:09 RishiDas001

Same issue here.. any solutions yet??

sonikanishk avatar Feb 20 '21 11:02 sonikanishk