minio_client.fput_object(
MY_BUCKET,
f"some/path/file.ext",
my_file_path,
metadata={"SomeField": " some value"}
)
Signature mismatch occurs:
minio.error.S3Error: S3 operation failed; code: SignatureDoesNotMatch, message: The request signature we calculated does not match the signature you provided. Check your key and signing method.
When I remove the spaces before some value, put object happens fine.
When the following is done:
Signature mismatch occurs:
When I remove the spaces before
some value
, put object happens fine.Looks like there is replacement/removal of spaces happening here: https://github.com/minio/minio-py/blob/57c5e377d0a14cd3b866c8013f7f4e45223f7165/minio/signer.py#L77 prior to signing which is leading to the signature mismatch.