我只是尝试在python3.4中使用python sdk创建一个队列,但使用以下代码:
from azure.storage import QueueService
q = QueueService("user", "password")
q.create_queue('testqueue')
我明白了:
Traceback (most recent call last):
File "new.py", line 4, in <module>
q.create_queue('testqueue')
File "/usr/local/lib/python3.4/dist-packages/azure/storage/queueservice.py", line 151, in create_queue
request, self.account_name, self.account_key)
File "/usr/local/lib/python3.4/dist-packages/azure/storage/__init__.py", line 447, in _update_storage_queue_header
return _update_storage_blob_header(request, account_name, account_key)
File "/usr/local/lib/python3.4/dist-packages/azure/storage/__init__.py", line 440, in _update_storage_blob_header
account_key)))
File "/usr/local/lib/python3.4/dist-packages/azure/storage/__init__.py", line 516, in _sign_storage_blob_request
_sign_string(account_key, string_to_sign)
File "/usr/local/lib/python3.4/dist-packages/azure/__init__.py", line 988, in _sign_string
key = _decode_base64_to_bytes(key)
File "/usr/local/lib/python3.4/dist-packages/azure/__init__.py", line 167, in _decode_base64_to_bytes
return base64.b64decode(data)
File "/usr/lib/python3.4/base64.py", line 90, in b64decode
return binascii.a2b_base64(s)
binascii.Error: Incorrect padding
问题是我正在尝试使用单个队列创建一个ubuntu VM的Linux自动扩展服务器场。当此队列包含多个x消息时,服务器场会扩展,而不是使用1个VM,它使用2或3。
我已经拥有了我的虚拟机,我配置了可用性集,负载均衡,但我已停在队列中。
有人可以提供帮助,这会很棒!
由于
我终于在这里找到了答案在哪里可以找到我的Azure帐户名和帐户密钥?
感谢Jason Hogg - MSFT解决我的真正问题,我认为这是另一回事。
答案 0 :(得分:2)
我终于在Where can I find my Azure account name and account key?
找到了答案感谢Jason Hogg - MSFT解决我的真正问题,我认为这是另一回事。
答案 1 :(得分:0)
您是否尝试将“user”替换为存储帐户名,将“password”替换为与存储帐户关联的访问密钥?
杰森