minio / minio-py

MinIO Client SDK for Python

Home Page:https://docs.min.io/docs/python-client-quickstart-guide.html

Repository from Github https://github.comminio/minio-pyRepository from Github https://github.comminio/minio-py

Part size is not supported; minimum allowed 5MiB when using upload_snowball_objects for small objects

erwin-vanduijnhoven opened this issue · comments

Whenever I try to upload a list of snowballobjects where its total size is less than 5MiB I get the following error:

part size 425 is not supported; minimum allowed 5MiB

This can be easily fixed by setting the part_size to be 5MiB 5 * (1024) ** 2 minimally in the upload_snowball_objects method.

minio-py/minio/api.py

Lines 2766 to 2780 in 8e681bb

if not name:
length = fileobj.tell()
fileobj.seek(0)
else:
length = os.stat(name).st_size
if name:
return self.fput_object(bucket_name, object_name, staging_filename,
metadata=metadata, sse=sse,
tags=tags, retention=retention,
legal_hold=legal_hold, part_size=length)
return self.put_object(bucket_name, object_name, fileobj,
length, metadata=metadata, sse=sse,
tags=tags, retention=retention,
legal_hold=legal_hold, part_size=length)

Fixed by #1333

Fixed by #1333

I saw that you have already fixed this issue. I upgraded the minio-py version to 7.2.2, but the problem still exists. It seems like the code has been fixed. What should I do next in order to validate it?

Enable trace_on() and see what's going on