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/12/14 07:54:15 UTC

[GitHub] [superset] vivek-kandhvar commented on issue #17430: superset export_dashboards not working (1.3.2 or master) - JSON TypeError

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