You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling the API above yields the following result:
Traceback (most recent call last):
File "/Users/admin/Workspace/data_collection_bot/get_annotations.py", line 15, in <module>
(data, response) = api_client.tasks_api.retrieve_annotations(
File "/Users/admin/miniconda3/lib/python3.10/site-packages/cvat_sdk/api_client/api/tasks_api.py", line 3437, in retrieve_annotations
return self.retrieve_annotations_endpoint.call_with_http_info(**kwargs)
File "/Users/admin/miniconda3/lib/python3.10/site-packages/cvat_sdk/api_client/api_client.py", line 1058, in call_with_http_info
return self.api_client.call_api(
File "/Users/admin/miniconda3/lib/python3.10/site-packages/cvat_sdk/api_client/api_client.py", line 497, in call_api
return self.__call_api(**params)
File "/Users/admin/miniconda3/lib/python3.10/site-packages/cvat_sdk/api_client/api_client.py", line 282, in __call_api
return_data = self.deserialize(
File "/Users/admin/miniconda3/lib/python3.10/site-packages/cvat_sdk/api_client/api_client.py", line 389, in deserialize
deserialized_data = validate_and_convert_types(
File "/Users/admin/miniconda3/lib/python3.10/site-packages/cvat_sdk/api_client/model_utils.py", line 1590, in validate_and_convert_types
converted_instance = attempt_convert_item(
File "/Users/admin/miniconda3/lib/python3.10/site-packages/cvat_sdk/api_client/model_utils.py", line 1479, in attempt_convert_item
raise conversion_exc
File "/Users/admin/miniconda3/lib/python3.10/site-packages/cvat_sdk/api_client/model_utils.py", line 1470, in attempt_convert_item
return deserialize_model(input_value, valid_class,
File "/Users/admin/miniconda3/lib/python3.10/site-packages/cvat_sdk/api_client/model_utils.py", line 1386, in deserialize_model
return model_class._new_from_openapi_data(model_data, **kw_args)
File "/Users/admin/miniconda3/lib/python3.10/site-packages/cvat_sdk/api_client/model_utils.py", line 51, in wrapped_init
return fn(_self, *args, **kwargs)
File "/Users/admin/miniconda3/lib/python3.10/site-packages/cvat_sdk/api_client/model_utils.py", line 355, in _new_from_openapi_data
oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg)
File "/Users/admin/miniconda3/lib/python3.10/site-packages/cvat_sdk/api_client/model_utils.py", line 1904, in get_oneof_instance
raise ApiValueError(
cvat_sdk.api_client.exceptions.ApiValueError: Invalid inputs given to generate an instance of AnnotationsRead. Multiple oneOf schemas matched the inputs, but a max of one is allowed.
I've searched the source code and found out that the problem happens when the response is deserialized and matched with AnnotationsRead, but the response.data field is actually empty.
I am not sure what the exact problem is.
Am I calling the API in a correct way? I have no idea what the returned response should be and where can I retrieve the data. I also tried to directly export it from the UI and I got a zip file, so I expect it is returned as something like a string buffer.
The text was updated successfully, but these errors were encountered:
Hi, please read this answer about dataset downloading. Everything is the same for downloading annotations. Please also consider using the high-level SDK, which allows downloading annotations and datasets simpler.
Awesome! Would you please consider updating doc in this doc(and job/project's retrieve_annotations)? I haven't read the page about low level API before and every time I directly go to the API reference page because it offers examples as well. I believe people encounter similar issues because they are checking the wrong page.
My actions before raising this issue
Calling the API above yields the following result:
I've searched the source code and found out that the problem happens when the response is deserialized and matched with
AnnotationsRead
, but theresponse.data
field is actually empty.I am not sure what the exact problem is.
Am I calling the API in a correct way? I have no idea what the returned response should be and where can I retrieve the data. I also tried to directly export it from the UI and I got a zip file, so I expect it is returned as something like a string buffer.
The text was updated successfully, but these errors were encountered: