You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/11/12 23:28:48 UTC
[GitHub] [superset] gl opened a new issue #17430: superset export_dashboards not working (1.3.2 or master) - JSON TypeError
gl opened a new issue #17430:
URL: https://github.com/apache/superset/issues/17430
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 <module>
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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] vivek-kandhvar commented on issue #17430: superset export_dashboards not working (1.3.2 or master) - JSON TypeError
Posted by GitBox <gi...@apache.org>.
vivek-kandhvar commented on issue #17430:
URL: https://github.com/apache/superset/issues/17430#issuecomment-993250988
This issue is present even in 1.3.0 and has been taken forward to 1.4.0 as well.
Let me add more context on this.
1. Login to superset and create a new chart.
2. Click `Save`, and give some name and create a new dashboard, and click `Save and Go to Dashboard`
3. Now go to Dashboard list and locate the one created and in actions, click `Export`
4. The UI hangs forever with loading icon.
Also added the video for the above steps
https://user-images.githubusercontent.com/29149291/145955274-c0efbf0c-2480-452c-830c-c43db280ed2e.mp4
Logs:
```
2021-12-14 07:14:25,878:ERROR:root:the JSON object must be str, bytes or bytearray, not NoneType
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/api/__init__.py", line 85, in wraps
return f(self, *args, **kwargs)
File "/app/superset/views/base_api.py", line 85, in wraps
raise ex
File "/app/superset/views/base_api.py", line 82, in wraps
duration, response = time_function(f, self, *args, **kwargs)
File "/app/superset/utils/core.py", line 1464, in time_function
response = func(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/api/__init__.py", line 155, in wraps
return f(self, *args, **kwargs)
File "/app/superset/utils/log.py", line 242, in wrapper
value = f(*args, **kwargs)
File "/app/superset/dashboards/api.py", line 743, in export
export = Dashboard.export_dashboards(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
```
DB:
![image](https://user-images.githubusercontent.com/29149291/145955698-440a2c02-ad76-4459-85d4-38c892b33531.png)
`position_json` and `json_metadata` is empty which is breaking the export dashboard api flow.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] eschutho commented on issue #17430: superset export_dashboards not working (1.3.2 or master) - JSON TypeError
Posted by GitBox <gi...@apache.org>.
eschutho commented on issue #17430:
URL: https://github.com/apache/superset/issues/17430#issuecomment-1022638749
Hi @gl you may want to try the new import/export feature which is currently behind a feature flag, as this old version is soon to be deprecated. The flag is `VERSIONED_EXPORT=True`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org