client.tasks.list with fields="all" fails
matnel opened this issue · 3 comments
matnel commented
While I tried to see if I can fix #237 with client.tasks.list( project = "1", fields = "all" )
I get following error:
File "/opt/homebrew/lib/python3.10/site-packages/label_studio_sdk/tasks/client.py", line 197, in list
_parsed_response = pydantic_v1.parse_obj_as(TasksListResponse, _response.json()) # type: ignore
File "pydantic/tools.py", line 38, in pydantic.tools.parse_obj_as
File "pydantic/main.py", line 342, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 40 validation errors for ParsingModel[TasksListResponse]
__root__ -> tasks -> 0 -> file_upload
value is not a valid integer (type=type_error.integer)
__root__ -> tasks -> 1 -> file_upload
value is not a valid integer (type=type_error.integer)
But it works fine when I do client._client_wrapper.httpx_client.request(f"api/tasks/", data = {"project": "1", "page_size": 10000,"fields":"all"} ,method="GET").json()
niklub commented