enter image description hereThe Error is as shown in the image
2
The package you imported is incorrect.
The method from_blob_url belong to package BlobClient instead of BlobServiceClient.
from_blob_url
from azure.storage.blob import BlobClient BlobClient.from_blob_url
I followed the below Steps to download the file from the blob storage to local path
Adding input to @MingJie-MSFT
Create an Azure Storage account, Container and Upload the file
from fileinput import filename from azure.storage.blob import BlobServiceClient from azure.storage.blob import BlobClient blob_url = "your blob url" file_name = "hello2.log" blob_client= BlobClient.from_blob_url(blob_url) with open(file_name, "wb") as my_blob: download_stream= blob_client.download_blob() my_blob.write(download_stream.readall())
Click here to cancel reply.
2
Answers
The package you imported is incorrect.
The method
from_blob_url
belong to package BlobClient instead of BlobServiceClient.Adding input to @MingJie-MSFT
Create an Azure Storage account, Container and Upload the file