Goal: My goal is to export the all the dashboards from the superset so that I can save them as backup and also make sure that I can import them.
Existing setup: I am cloning superset from git and using docker-compose -f docker-compose-non-dev.yml up
to setup and run the superset (following this documentation)
Issue:
Using superset CLI: I am using this documentation
to connect to the existing docker image on which superset is running and then running superset export-dashboards
but it throws the following error:
Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
logging was configured successfully
2021-10-20 06:54:49,727:INFO:superset.utils.logging_configurator:logging was configured successfully
2021-10-20 06:54:49,732:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
/usr/local/lib/python3.8/site-packages/flask_caching/__init__.py:201: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
warnings.warn(
Starting export
2021-10-20 06:54:50,962:INFO:superset.utils.dashboard_import_export:Starting export
Traceback (most recent call last):
File "/usr/local/bin/superset", line 33, in <module>
sys.exit(load_entry_point('apache-superset', 'console_scripts', 'superset')())
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 586, in main
return super(FlaskGroup, self).main(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 426, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 426, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/app/superset/cli.py", line 413, in export_dashboards
data = dashboard_import_export.export_dashboards(db.session)
File "/app/superset/utils/dashboard_import_export.py", line 33, in export_dashboards
data = Dashboard.export_dashboards(dashboard_ids)
File "/app/superset/models/dashboard.py", line 385, in export_dashboards
json_metadata = json.loads(dashboard.json_metadata)
File "/usr/local/lib/python3.8/json/__init__.py", line 341, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not NoneType
Kindly help me debug, I have also changed the "VERSIONED_EXPORT": True