Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload_file ExtraArgs={"ChecksumAlgorithm": "sha256"} Error #4102

Open
Fibley-C opened this issue Apr 26, 2024 · 2 comments
Open

upload_file ExtraArgs={"ChecksumAlgorithm": "sha256"} Error #4102

Fibley-C opened this issue Apr 26, 2024 · 2 comments
Assignees
Labels
bug This issue is a confirmed bug. closing-soon This issue will automatically close in 4 days unless further comments are made. response-requested Waiting on additional information or feedback. s3 third-party

Comments

@Fibley-C
Copy link

Describe the bug

When running s3.upload_file(file_path, bucket, key, ExtraArgs={"ChecksumAlgorithm": "sha256"}) to upload a file to Wasabi S3.

I receive the following error

An error occurred (IncompleteBody) when calling the PutObject operation: You did not provide the number of bytes specified by the Content-Length HTTP header

Running s3.upload_file(file_path, bucket, key) executes fine

Versions Installed:
Python 3.12.2
boto3 1.34.87
botocore 1.34.87

Expected Behavior

upload_file would succeed and the file would be uploaded with a SHA256 checksum

Current Behavior

An error occurred (IncompleteBody) when calling the PutObject operation: You did not provide the number of bytes specified by the Content-Length HTTP header

Is produced

Reproduction Steps

Attempt to run

s3.upload_file(file_path, bucket, key, ExtraArgs={"ChecksumAlgorithm": "sha256"})

On a S3 compatible vendor such as Wasabi

Possible Solution

N/A

Additional Information/Context

No response

SDK version used

1.34.87

Environment details (OS name and version, etc.)

Windows Server 2022

@Fibley-C Fibley-C added bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels Apr 26, 2024
@tim-finnigan tim-finnigan self-assigned this May 1, 2024
@tim-finnigan
Copy link
Contributor

Hi @Fibley-C thanks for reaching out. This is likely an issue with how Wasabi handles the upload. Unfortunately we cannot guarantee support with any third-party integrations - I reaching out to them to report this issue, probably here: https://wasabi.com/help/.

The IncompleteBody error is coming from the S3 API response: https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html. And the ChecksumAlgorithm is a valid parameter for ExtraArgs as documented here. If you believe this is a Boto3 issue then please provide a code snippet to reproduce the issue, as well as logs (with sensitive info redacted) by adding boto3.set_stream_logger('') to your script for us to investigate further.

@tim-finnigan tim-finnigan added response-requested Waiting on additional information or feedback. s3 third-party and removed needs-triage This issue or PR still needs to be triaged. labels May 1, 2024
Copy link

Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a confirmed bug. closing-soon This issue will automatically close in 4 days unless further comments are made. response-requested Waiting on additional information or feedback. s3 third-party
Projects
None yet
Development

No branches or pull requests

2 participants