HumanSignal/label-studio-sdk

`get_labeled_tasks()` gets 404 due to requesting "Invalid page"

tgrigoruk opened this issue · 2 comments

It seems that get_labeled_tasks is passing a bad page param which results in this error being displayed (though the correct tasks data is still retrieved!).
To avoid this noise I have to use get_paginated_tasks - I can't use get_tasks because it doesn't retrieve all fields, and I need storage_filename.

project = ls_client.get_project(project_id)
tasks = project.get_labeled_tasks()
--------------------------------------------
Request URL: http://<myipaddress>/api/tasks?project=8&page=2&page_size=100&query=%7B%22filters%22%3A+%7B%22conjunction%22%3A+%22and%22%2C+%22items%22%3A+%5B%7B%22filter%22%3A+%22filter%3Atasks%3Acompleted_at%22%2C+%22operator%22%3A+%22empty%22%2C+%22value%22%3A+false%2C+%22type%22%3A+%22Datetime%22%7D%5D%7D%2C+%22ordering%22%3A+%5B%5D%2C+%22selectedItems%22%3A+%7B%22all%22%3A+true%2C+%22excluded%22%3A+%5B%5D%7D%7D&fields=all&resolve_uri=True
Response status code: 404
Response content:
{
  "id": "fdd18557-9050-430f-b523-99db570ffae9",
  "status_code": 404,
  "version": "1.8.1",
  "detail": "Invalid page.",
  "exc_info": null
}

Using label-studio-sdk 0.0.30

tonal commented

see #148

Hi folks, this was fixed in #153. Version 0.0.32 shouldn't emit this misleading log output when getting tasks.