Closed jaehwana2z closed 1 month ago
Steps to reproduce the behavior:
Line 295 of download_from_azure in download.py parses the url as follows:
download_from_azure
download.py
blob_client = service.get_blob_client(container=obj.netloc, blob=obj.path.lstrip('/'))
where obj.netloc == account_name.blob.core.windows.net and obj.path.lstrip('/') == container_name/path/to/blob from the example path in step 1. above.
obj.netloc == account_name.blob.core.windows.net
obj.path.lstrip('/') == container_name/path/to/blob
However, this is incorrect, because to properly download the blob, container should be container_name and blob should be path/to/blob.
container
container_name
blob
path/to/blob
Fixing the line to
directories = obj.path.lstrip('/').split('/') blob_client = service.get_blob_client(container=directories[0], blob='/'.join(directories[1:]))
solves the issue for me
@jaehwana2z Hey, thanks for flagging! Mind submitting a PR? We always welcome community improvements, and happy to review.
Environment
To reproduce
Steps to reproduce the behavior:
Expected behavior
Line 295 of
download_from_azure
indownload.py
parses the url as follows:where
obj.netloc == account_name.blob.core.windows.net
andobj.path.lstrip('/') == container_name/path/to/blob
from the example path in step 1. above.However, this is incorrect, because to properly download the blob,
container
should becontainer_name
andblob
should bepath/to/blob
.Fixing the line to
solves the issue for me
Additional context