Skip to content

superset export_dashboards not working (1.3.2 or master) - JSON TypeError #17430

@gl

Description

@gl

Hello,

I can't seem to be able to export all my dashboards, whether using 1.3.2 nor current master. It is broken in cli (see below), and from the GUI, a bulk export just hangs indefinitely.

Note that the database is sqlite and was upgraded just before from a very old version to the most recent one.

This is 1.3.2 output:

superset@f6c836281487:/app$ superset export_dashboards -f /tmp/d.json
logging was configured successfully
2021-11-12 23:21:48,017:INFO:superset.utils.logging_configurator:logging was configured successfully
2021-11-12 23:21:48,026:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
/usr/local/lib/python3.7/site-packages/flask_caching/init.py:202: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
"Flask-Caching: CACHE_TYPE is set to null, "
Starting export
2021-11-12 23:21:49,748:INFO:superset.utils.dashboard_import_export:Starting export
Traceback (most recent call last):
File "/usr/local/bin/superset", line 33, in
sys.exit(load_entry_point('apache-superset', 'console_scripts', 'superset')())
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 586, in main
return super(FlaskGroup, self).main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 426, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 426, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/app/superset/cli.py", line 381, 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 365, in export_dashboards
json_metadata = json.loads(dashboard.json_metadata)
File "/usr/local/lib/python3.7/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    #bugBug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions