Skip to content

Bug in azure-storage-blob #15919

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

Closed
Juliehzl opened this issue Dec 25, 2020 · 2 comments · Fixed by #16987
Closed

Bug in azure-storage-blob #15919

Juliehzl opened this issue Dec 25, 2020 · 2 comments · Fixed by #16987
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files)

Comments

@Juliehzl
Copy link

As shown in model serialization for ContentSettings, the required type for content_md5 is str as shown below:


But when uploading, content_md5 needs to be converted to bytearray and the following code would cause a bug when converting a string to bytearray.
blob_content_md5=bytearray(content_settings.content_md5) if content_settings.content_md5 else None,

blob_content_md5=bytearray(content_settings.content_md5) if content_settings.content_md5 else None,
TypeError: string argument without an encoding

This would cause error when uploading with content_md5. Please fix asap.

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Dec 25, 2020
@Rishab-Binoy
Copy link

Hi, I'm new to this. I searched online for this issue and I found out that the bytearray() function needs a second argument specifying the type of encoding required when the source is a string. I hope this solves this issue.

@xiangyan99 xiangyan99 added bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files) labels Feb 25, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Feb 25, 2021
@tasherif-msft tasherif-msft self-assigned this Mar 1, 2021
@xiafu-msft
Copy link
Contributor

#13003

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants