Superset CLI for exporting and importing the dashboards #18333
Unanswered
alihussainmeer
asked this question in
Q&A / Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
[Question] Superset Export job on docker compose throwing error.
Goal: I want to export and import the dashboards using the superset CLI so that I can have a backup of the dashboards which will help me in version control.
How to reproduce the bug
superset export-dashboards
."VERSIONED_EXPORT": True
in config files.Expected results
I expect to download the zip/json file for all the dashboards, so that I can later import them.
Actual results
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
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
(please complete the following information):
python 3.7
Checklist
Make sure to follow these steps before submitting your issue - thank you!
Additional context
Add any other context about the problem here.
Beta Was this translation helpful? Give feedback.
All reactions