label-studio-sdk icon indicating copy to clipboard operation
label-studio-sdk copied to clipboard

client.projects.exports.download returns None

Open Duoquote opened this issue 5 months ago • 1 comments

I have the following code:

from label_studio_sdk import ExportCreate, ExportConvert
from label_studio_sdk.client import LabelStudio

LABEL_STUDIO_URL = '...'
API_KEY = '...'
PROJECT_ID = 1

ls = LabelStudio(base_url=LABEL_STUDIO_URL, api_key=API_KEY)

export_task = ls.projects.exports.create(
    id=PROJECT_ID,
    request=ExportCreate()
)

convert_task = ls.projects.exports.convert(
    id=PROJECT_ID,
    export_pk=export_task.id,
    request=ExportConvert(
        export_type="YOLO"
    )
)

data = ls.projects.exports.download(id=PROJECT_ID, export_pk=export_task.id, export_type="YOLO")

And the value of data is None, I am testing it on notebook so I am sure the task is in completed state.

Duoquote avatar Sep 16 '24 14:09 Duoquote