alihussainmeer opened a new issue #17164:
URL: https://github.com/apache/superset/issues/17164


   [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
   
   1. I am following the 
[documentation](https://superset.apache.org/docs/installation/installing-superset-using-docker-compose)
 to install superset on my local machine using docker compose.
   2. Then I used this 
[documentation](https://support.websoft9.com/docs/superset/solution-cli.html)  
to connect to the existing docker container on which superset is running, so 
that I can use `superset export-dashboards`.
   3. I have also changed the `"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):
   
   - browser type and version: Chrome
   - superset version: latest
   - python version: `python 3.7`
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [ ] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [ ] I have reproduced the issue with at least the latest released version 
of superset.
   - [ ] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   
   ### Additional context
   
   Add any other context about the problem here.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to