`get_labeled_tasks()` gets 404 due to requesting "Invalid page"
tgrigoruk opened this issue · 2 comments
tgrigoruk commented
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