Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client.tasks.list with fields="all" fails #238

Closed
matnel opened this issue Jun 10, 2024 · 3 comments
Closed

client.tasks.list with fields="all" fails #238

matnel opened this issue Jun 10, 2024 · 3 comments

Comments

@matnel
Copy link

matnel commented Jun 10, 2024

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
Copy link
Contributor

niklub commented Jun 11, 2024

@matnel thanks for reporting this. The fix is included in #236
It will be merged today and released as part of 1.0.1 version.

@niklub
Copy link
Contributor

niklub commented Jun 12, 2024

@matnel, please update the latest version of pip install -U label-studio-sdk>=1.0.1
Let me know if the issue still persists, otherwise we can close it

@sajarin
Copy link

sajarin commented Jun 19, 2024

@matnel thanks for reporting the initial bug, feel free to create a new issue or message me on Slack if the issue persists (and I'll reopen this issue for more discussion)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants