Raspberianの下でPythonを使用して、Raspberry 3/Sense HatとAzure Storage Table Serviceとの接続を設定する際に問題があります。RaspbianのPythonを使用したAzureストレージのテーブルサービス
from sense_hat import SenseHat
from azure.storage.table import TableService
sense = SenseHat()
table_service = TableService(account_name='sensehat',
account_key=<myaccountkey>)
table_name = 'sensehatdata'
table_service.create_table(table_name, False)
エラートレースバックがある:https://docs.microsoft.com/en-us/azure/storage/storage-python-how-to-use-table-storageでチュートリアルの後、私が使用するコードは(当然のmyaccountkey挿入、)である私のストレージアカウントへ
Traceback (most recent call last):
File "/home/pi/senseHat2Azure.py", line 22, in <module>
table_service.create_table(table_name, False)
File "/usr/local/lib/python2.7/dist-packages/azure/storage/table/tableservice.py", line 281, in create_table
self._perform_request(request)
File "/usr/local/lib/python2.7/dist-packages/azure/storage/storageclient.py", line 171, in _perform_request
resp = self._filter(request)
File "/usr/local/lib/python2.7/dist-packages/azure/storage/table/tableservice.py", line 667, in _perform_request_worker
return self._httpclient.perform_request(request)
File "/usr/local/lib/python2.7/dist-packages/azure/storage/_http/httpclient.py", line 181, in perform_request
self.send_request_body(connection, request.body)
File "/usr/local/lib/python2.7/dist-packages/azure/storage/_http/httpclient.py", line 143, in send_request_body
connection.send(request_body)
File "/usr/local/lib/python2.7/dist-packages/azure/storage/_http/requestsclient.py", line 81, in send
self.response = self.session.request(self.method, self.uri, data=request_body, headers=self.headers, timeout=self.timeout)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 457, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 569, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 407, in send
raise ConnectionError(err, request=request)
ConnectionError: ('Connection aborted.', gaierror(-2, 'Name or service not known'))
いくつかの詳細:
- は、ブロブではなく一般的な目的でセットアップされています。
- 西ヨーロッパ
アイデアをお寄せいただきありがとうございます。
は、「sensehat」というストレージアカウントですか? – 4c74356b41
別のこと....ストレージアカウントの冗長性タイプとは何ですか?万が一ZRSまたはプレミアムLRSですか? –
両方ともyes:アカウント名は 'sensehat'、複製は' ZRS(Zone-redundant storage) 'です – noteven2degrees