I've download Azure SDK for python to my Ubuntu (Tool version 0.8.16). And i'm trying to run this code
from azure.storage import BlobService blob_service = BlobService(account_name='Real_Name', account_key='Real_Key') blob_service.create_container('mycontainer') blob_service.create_container('mycontainer', x_ms_blob_public_access='container') blob_service.put_block_blob_from_path( 'mycontainer', 'myblob', 'sunset.png', x_ms_blob_content_type='image/png' ) I've saved it under Test.py and i'm trying to run it with
python Test.py in terminal and i get this error
Traceback (most recent call last): File "Test.py", line 3, in <module> blob_service.create_container('mycontainer') File "/home/parallels/azure-sdk-for-python/azure/storage/blobservice.py", line 203, in create_container _dont_fail_on_exist(ex) File "/home/parallels/azure-sdk-for-python/azure/__init__.py", line 525, in _dont_fail_on_exist raise error azure.WindowsAzureError: Unknown error (Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.) <?xml version="1.0" encoding="utf-8"?><Error><Code>AuthenticationFailed</Code><Message>Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:98ce37f9-0001-003f-350e-7d3666000000 Time:2015-03-24T10:07:00.3385327Z</Message><AuthenticationErrorDetail>Request date header too old: 'Tue, 24 Mar 2015 09:06:59 GMT'</AuthenticationErrorDetail></Error> How to fix this, and am i do everything right?
Thanks