AttributeError: '_SharedAccessHelper' object has no attribute 'add_resource_signature'
See original GitHub issueWhich service(blob, file, queue) does this issue concern?
blob
Which version of the SDK was used? Please provide the output of pip freeze
.
2.0.0
What problem was encountered?
This code doesn’t work anymore in 2.0.0:
# create a template sas token for the container
service = BlockBlobService(account_name=storage_account_name,
# don't sign the template with the storage account key use key 00000000
account_key='00000000')
permissions = ContainerPermissions(read=True, write=True, delete=True, list=True)
temp_token = service.generate_container_shared_access_signature(container_name='blobcontainer',
permission=permissions,
expiry='2020-01-01')
Stack trace (enhanced by pytest):
self = <azure.storage.blob.sharedaccesssignature.BlobSharedAccessSignature object at 0x7fd42a8182b0>
container_name = 'blobcontainer'
permission = <azure.storage.blob.models.ContainerPermissions object at 0x7fd42a80c0f0>
expiry = '2020-01-01', start = None, id = None, ip = None, protocol = None
cache_control = None, content_disposition = None, content_encoding = None
content_language = None, content_type = None
def generate_container(self, container_name, permission=None, expiry=None,
start=None, id=None, ip=None, protocol=None,
cache_control=None, content_disposition=None,
content_encoding=None, content_language=None,
content_type=None):
sas = _SharedAccessHelper()
sas.add_base(permission, expiry, start, ip, protocol, self.x_ms_version)
sas.add_id(id)
sas.add_resource('c')
sas.add_override_response_headers(cache_control, content_disposition,
content_encoding, content_language,
content_type)
> sas.add_resource_signature(self.account_name, self.account_key, 'blob', container_name)
E AttributeError: '_SharedAccessHelper' object has no attribute 'add_resource_signature'
Have you found a mitigation/solution?
No
Note: for table service, please post the issue here instead: https://github.com/Azure/azure-cosmosdb-python.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
AttributeError: '' object has no attribute '' - python - Stack Overflow
Your NewsFeed class instance n doesn't have a Canvas attribute. If you want to pass the Canvas defined in your Achtergrond class instance ......
Read more >AttributeError: 'MultivariateSample' object has no attribute 'train'
While running the python code that is available in the linkclient-libraries-multivariate , i got the below error in "Run the Application" area.
Read more >AttributeError: 'NoneType' object has no attribute 'call' on ...
Hello, I'm at a loss to explain why this flow fails and succeeds at the same time… It only consists in triggering a...
Read more >AttributeError: 'NoneType' object has no attribute 'get_items'
Hello everyone, We have imported one job (Local Resolution Estimation) from an old project and an old instance onto a newly installed, ...
Read more >Python AttributeError — What is it and how do you fix it?
AttributeError : '***' object has no attribute '***'What is an AttributeError in Python? What can you do to fix it? When does it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lmazuel should be fixed now. Could you please re-trigger your CI to verify?
No problem 😃. Indeed it works with 1.4.2. Thanks!