Hugh Nolan

09/14/2022, 4:02 PM
hey, question using the python lakefs_client package I'm getting an error
ApiTypeError: Invalid type for variable 'received_data'. Required value type is ObjectErrorList and passed type was str at ['received_data']
using the
call. Despite the error, I can see my files are deleted. Diving in, it looks like the HTTP response received is an empty string, with a 204 header. This appears to be correct according to the API - https://docs.lakefs.io/reference/api.html#/objects/deleteObjects I seem to be getting a valid response here so I'm hoping I'm not doing something wrong? but the autogenerated API only seems to know about the ObjectErrorList which comes with a 200 header:
self.delete_objects_endpoint = _Endpoint(
                'response_type': (ObjectErrorList, ),
                'auth': [
                'endpoint_path': '/repositories/{repository}/branches/{branch}/objects/delete',
                'operation_id': 'delete_objects',
                'http_method': 'POST',
                'servers': None,
Is this a bug (and where should I report if so), or am I doing something wrong?
Barak Amar

Barak Amar

09/14/2022, 6:10 PM
Hi @Hugh Nolan, verified the above - please open an issue. The API returns no content when all files we request deleted. In case we fail to delete one of the files we return an array of errors. It seems that the generated client doesn't handle the no content case correctly.
6:14 PM
Also, we published generated docs for python https://pydocs.lakefs.io/
6:14 PM
hope it will help (not for the above) but for future development.

Hugh Nolan

09/14/2022, 6:34 PM
thank you @Barak Amar