HumanSignal / HumanSignal/label-studio

import new tasks after add label some tasks

Open
#5,478 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

Hi,I'm importing task like API docs and work.
```
curl -H 'Content-Type: application/json' -H 'Authorization: Token abc123' \
-X POST 'https://localhost:8080/api/projects/1/import' --data '[{"text": "Some text 1"}, {"text": "Some text 2"}]
```
but when I add label to a task and import new data like below give me error
```
curl -H 'Content-Type: application/json' -H 'Authorization: Token abc123' \
-X POST 'https://localhost:8080/api/projects/1/import' --data '[{"text": "Some text 3"}, {"text": "Some text 4"}]
{
"id": "971aa980-b4e8-4ad4-bb54-75d69b5ba55d",
"status_code": 400,
"version": "1.11.0",
"detail": "Validation error",
"exc_info": null,
"validation_errors": {
"non_field_errors": [
"Error at item 0: \"item\" key is expected in task data [assume: item as is = task root with values] :: {'text': 'Some text 3'}"
]
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.