0
votes

Getting object has no attribute 'read' when trying to download file from Azure not public blob storage with Azure Storage SDK for Python

blob_service = BlockBlobService(account_name = account_name, account_key = blob_key)
    blob_service.get_blob_to_path(container_name,remote_file_name,local_file_name)

I generated SAS token with expiration date but there is no information how to use it with BlockBlobService ? It works fine for public files.

1

1 Answers

2
votes

you can actually use the following syntax:

bbs = BlockBlobService(account_name='<account_name>', sas_token='<sas_token>')

More information can be found in this repo

When it comes to the 'read', please ensure that the SAS has all required access to read blob services as well(worth double checking): enter image description here