Azure / azure-cosmos-table-python

Python SDK for Azure CosmosDB
Apache License 2.0
27 stars 22 forks source link

azure-cosmosdb-table and azure-storage-common do not match #15

Closed onestone1879 closed 6 years ago

onestone1879 commented 6 years ago

environment: Python2.7, azure-storage-common==0.37.1 and azure-cosmosdb-table==1.0.0
when using connection_string to create a TableService raise an error:

    TABLE_SERVICE = TableService(connection_string=STORAGE_CONNECTION_STRING)
  File "/usr/local/lib/python2.7/dist-packages/azure/cosmosdb/table/tableservice.py", line 183, in __init__
    socket_timeout=socket_timeout)
  File "/usr/local/lib/python2.7/dist-packages/azure/storage/common/_connection.py", line 115, in get_service_parameters
    params = _ServiceParameters._from_connection_string(connection_string, service)
  File "/usr/local/lib/python2.7/dist-packages/azure/storage/common/_connection.py", line 152, in _from_connection_string
    endpoint = config.get(_CONNECTION_ENDPOINTS[service])
KeyError: 'table'

azure/common/_connection.py, in line 152 is:

endpoint = config.get(_CONNECTION_ENDPOINTS[service])

line 40 to 44:

_CONNECTION_ENDPOINTS = {
    'blob': 'BlobEndpoint',
    'queue': 'QueueEndpoint',
    'file': 'FileEndpoint',
}

there's no key named "table"

srinathnarayanan commented 6 years ago

Hi @onestone1879 we are looking into this. Will resolve ASAP

srinathnarayanan commented 6 years ago

Hi @onestone1879 this has been addressed in the 1.0.1 patch which you can download from github or directly install from PyPi Thanks

srinathnarayanan commented 6 years ago

Feel free to test the patch and then close the issue. Thanks!