adimyth opened a new issue, #22298:
URL: https://github.com/apache/superset/issues/22298

   There's an error with one of the preloaded charts (`Multi_Line_69.yaml`). 
This particular chart does not have a dataset attached to it. Hence exporting & 
importing default assets fail
   
   #### How to reproduce the bug
   
   1. Simple export all assets using the `/api/v1/assets/export/` api
   2. Try importing the exported zip file using the `/api/v1/assets/import/` api
   
   ### Expected results
   Successful import of the exported dashboards
   
   ### Actual results
   Importing throws an error -
   
   Curl Request
   ```bash
   curl -X 'POST' \
     'http://localhost:8088/api/v1/assets/import/' \
     -H 'accept: application/json' \
     -H 'Content-Type: multipart/form-data' \
     -F '[email protected];type=application/zip' \
     -F 'passwords={"databases/examples": "superset"}'
   ```
   
   Error Response
   ```json
   {
     "errors": [
       {
         "message": "Error importing assets",
         "error_type": "GENERIC_COMMAND_ERROR",
         "level": "warning",
         "extra": {
           "charts/Multi_Line_69.yaml": {
             "dataset_uuid": [
               "Missing data for required field."
             ]
           },
           "issue_codes": [
             {
               "code": 1010,
               "message": "Issue 1010 - Superset encountered an error while 
running a command."
             }
           ]
         }
       }
     ]
   }
   ```
   
   
   
   #### Screenshots
   Notice in the screenshot below that the chart is missing the `dataset_uuid` 
field
   ![Screenshot 2022-12-01 at 1 59 20 
PM](https://user-images.githubusercontent.com/26377913/205003718-ba0b6735-ff37-4af8-a0e8-ea8cb411edbf.png)
   
   
   ### Environment
   
   (please complete the following information):
   
   - browser type and version: Chromium
   
   ### Checklist
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version 
of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   


-- 
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