4

I'm trying to create a table using Azure storage account, but I got following error.

Traceback (most recent call last):
  File "./table.py", line 10, in <module>
    table_service.create_table('tasktable')
  File "/usr/local/lib/python2.7/dist-packages/azure/storage/table/tableservice.py", line 525, in create_table
    _dont_fail_on_exist(ex)
  File "/usr/local/lib/python2.7/dist-packages/azure/storage/_error.py", line 81, in _dont_fail_on_exist
    raise error
azure.common.AzureHttpError: Not Implemented
{"odata.error":{"code":"NotImplemented","message":{"lang":"en-US","value":"The requested operation is not implemented on the specified resource.\nRequestId:xxxxxxxxxxxxxxx\nTime:2017-02-06T09:23:30.6719100Z"}}}

My code is here:

#!/usr/bin/env python

from azure.storage.table import TableService, TablePermissions #Entity
from azure.storage.blob import BlockBlobService

table_service = TableService(account_name='myAccount', account_key='myKey')

table_service.create_table('tasktable')

task = Entity()
task.PartitionKey = 'tasksSeattle'
task.RowKey = '2'
task.description = 'Wash the car'
task.priority = 100

table_service.insert_entity('tasktable', task)

Someone help me.

2
  • Please check the "Kind" of storage account in which you're trying to create this table. More than likely you're trying to create this table in a storage account which doesn't support tables (ZRS, Premium LRS or Blob Storage). Commented Feb 6, 2017 at 9:37
  • @Gaurav Mantri I'm trying to crate table in a Blob Storage account. Commented Feb 6, 2017 at 9:44

1 Answer 1

4

Blob Storage accounts only support blobs. They don't support tables, queues & files. Because of this, when you try to create a table you're getting this error.

What you need to do is create a Standard storage account and use that in your code. Please note that you should not choose ZRS or Premium LRS redundancy level there as these also don't support tables. LRS, GRS and RAGRS redundancy should work just fine.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.