-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
azure.storage.blob.BlobClient.from_blob_url() parses incorrect blob name and container name #12563
Comments
Update: the issue is actually in from azure.storage.blob import BlobClient
PUBLIC_BLOB_URI = 'https://lilablobssc.blob.core.windows.net/nacti-unzipped/part0/sub000/2010_Unit150_Ivan097_img0003.jpg'
blob_client = BlobClient.from_blob_url(PUBLIC_BLOB_URI)
print(blob_client.blob_name)
print(blob_client.container_name) Running Code in Python REPL: >>> from azure.storage.blob import BlobClient
>>>
>>> PUBLIC_BLOB_URI = 'https://lilablobssc.blob.core.windows.net/nacti-unzipped/part0/sub000/2010_Unit150_Ivan097_img0003.jpg'
>>>
>>> blob_client = BlobClient.from_blob_url(PUBLIC_BLOB_URI)
>>> print(blob_client.blob_name)
'2010_Unit150_Ivan097_img0003.jpg'
>>> print(blob_client.container_name)
'sub000' |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage. |
Hi @chrisyeh96 Thanks for reporting this and post that pr. It's the SDKs problem with parsing blob url with sub directories! Sorry for the inconvenience. |
the fix has been released, you can do pip install azure-storage-blob==12.4.0 to use it. |
Thanks @xiafu-msft! The fix seems to work. Closing this issue. |
Enable python track2 pipeline (Azure#12563)
Enable python track2 pipeline (Azure#12563)
* CodeGen from PR 12563 in Azure/azure-rest-api-specs Enable python track2 pipeline (#12563) * test,version,CHANGELOG * fix test * fix changelog Co-authored-by: SDKAuto <sdkautomation@microsoft.com>
* CodeGen from PR 12563 in Azure/azure-rest-api-specs Enable python track2 pipeline (#12563) * test,version,CHANGELOG * fix test * fix changelog , version Co-authored-by: SDKAuto <sdkautomation@microsoft.com>
Describe the bug
azure.storage.blob.BlobClient.get_blob_properties()
returns incorrect "name" and "container" propertiesTo Reproduce
Steps to reproduce the behavior:
Code
Running Code in Python REPL:
Expected behavior
A clear and concise description of what you expected to happen.
The blob name should be
"part0/sub000/2010_Unit150_Ivan097_img0003.jpg"
instead of"2010_Unit150_Ivan097_img0003.jpg"
and the container should be"nacti-unzipped"
instead of"sub000"
.The text was updated successfully, but these errors were encountered: