Open Raven888888 opened 1 year ago
I'm currently facing a similar issue as well.
What error does the second request fail with? The first error gives the reason why the upload fails (you have multiple images associated with the labeling configuration, and direct file upload of multiple files is not supported).
This is the input that I did, I'm assuming having 3 the same image wouldn't introduce any error.
files = { 'media' = open(data_to_upload, 'rb'), 'media2' = open(data_to_upload, 'rb'), 'media3' = open(data_to_upload, 'rb') }
This is the output message that I got
{"id":"7f906c60-29e4-461b-80ad-2b64d60dd4d8","status_code":400,"version":"1.8.0","detail":"Validation error","exc_info":null,"validation_errors":{"non_field_errors":["Failed to parse input file upload/1957/8e172e30-merged_image.png: [ErrorDetail(string='Your label config has more than one data key and direct file upload supports only one data key. To import data with multiple data keys, use a JSON or CSV file.', code='invalid')]"]}}
I have a similar message when I deploy the tool from official instructions in venv + run from the terminal console. When I try to import PNG files (in the "Import Data" view), I can see a message like this:
[bc73a464-263a-4dc2-b822-fe3d96ebd1cd] Validation error (Failed to parse input file upload/1/3f76192b-myimage.png: [ErrorDetail(string='Your label config has more than one data key and direct file upload supports only one data key. To import data with multiple data keys, use a JSON or CSV file.', code='invalid')])
Maybe I missed something in UI, but I can see instructions in "Import Data" that I can import PNG files. I've synced local catalogs in the "Cloud Storage" tab with success.
Please give me tips, on how to go forward with this tool.
Describe the bug For a single direct file upload to a project, it is working perfectly fine. However, when I upload multiple direct files to the same project, it does not support it.
To Reproduce
Create a project with template more than 1 data keys
Use API to upload direct files
Hit error
I also try doing this, but also fail
Expected behavior Able to do multiple direct files upload via API.
Environment (please complete the following information):