HumanSignal / HumanSignal/label-studio

Unable to import tasks due to a `exc_info` validation error.

Open
#5,038 2 comments 0 reactions 0 assignees View on GitHub
community:investigate community:reviewed
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

**Describe the bug**
I'm trying to use the Python `requests` library to import tasks into an existing Label Studio project. When I try to do so, I get the error `'version': '1.8.2', 'detail': 'Validation error', 'exc_info': None, 'validation_errors': {'non_field_errors': ['Error at item 0: "Image URL" key is expected in task data [assume: item["data"] = task root with values]`

**To Reproduce**
Steps to reproduce the behavior:

```
import requests

with open(file=data_file, mode="rb") as f:
data = f.read()

data_file = f"{data_file}_{idx}.csv"
import_data_headers = {
"Authorization": f"Token {api_key}",
}
import_data_files = {
"file": (data_file, chunk),
}
import_data_response = requests.post(
url=url,
files=import_data_files,
headers=import_data_headers,
timeout=100,
)
```

`data_file` should be a CSV file that has an image column. In my case, I'm using the AWS S3 URL (e.g., `s3://bucket/key.JPEG`) that I made.

**Expected behavior**
Previously, there wasn't an issue with this problem. We recently updated to Label Studio v1.8.2 and I think that's what's causing the error. The tasks should be imported without any issue.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment (please complete the following information):**
- OS: Ubuntu 22.04
- Label Studio Version: 1.8.2

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.