I have some issues with setting up a connection between a Raspberry 3 / Sense Hat combination to Azure Storage Table Service, using Python under Raspberian. Following the tutorial at https://docs.microsoft.com/en-us/azure/storage/storage-python-how-to-use-table-storage, the code I use is (myaccountkey inserted, of course):
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)
The error traceback is:
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'))
Some details to my storage account:
- set up as general purpose, not blob
- Western Europe
Many thanks for any ideas.
sensehat? - 4c74356b41sensehat, replication isZone-redundant storage (ZRS)- noteven2degrees