HumanSignal / HumanSignal/label-studio

Encoding issue when exporting as COCO via API

Open
#5,740 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

**Describe the bug**
When exporting in COCO format via API, the resulting file is not valid JSON, and something is off with the encoding where my system thinks it's a binary file. Exporting as JSON with the API works normally, and exporting as COCO in the UI works too.

I've only tried image datasets for object detection with bounding boxes, but I'm not sure that's relevant.

**To Reproduce**:
`curl -X GET http://localhost:8080/api/projects//export?exportType=COCO\&download_all_tasks=true\&download_resources=false -H 'Authorization: Token ' --output 'annotations.json'`

^ Replace the project ID and token with valid values, try to read `annotations.json`. It also happens without the `download_all_tasks` and `download_resources` flags

**Expected behavior**
COCO json saved to `annotations.json`

**Environment (please complete the following information):**
- OS: mac
- Label Studio Version v1.11.0

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.