hey, question using the python lakefs_client packa...
# help
h
hey, question using the python lakefs_client package I'm getting an error
Copy code
ApiTypeError: Invalid type for variable 'received_data'. Required value type is ObjectErrorList and passed type was str at ['received_data']
using the
client.objects.delete_objects
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:
Copy code
self.delete_objects_endpoint = _Endpoint(
            settings={
                'response_type': (ObjectErrorList, ),
                'auth': [
                    'basic_auth',
                    'cookie_auth',
                    'jwt_token',
                    'oidc_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?
👀 1
b
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.
Also, we published generated docs for python https://pydocs.lakefs.io/
hope it will help (not for the above) but for future development.
h
thank you @Barak Amar