none
workspace - get_default_datastore() - Operation returned an invalid status code 'Forbidden' RRS feed

  • Question

  • Hi,


    # WORKSPACE -------------------------------------------------------------
    ws = Workspace.get(name="XXX",
    subscription_id='XXX',
    resource_group='XXX')
    # DATASTORE -------------------------------------------------------------
    def_data_store = ws.get_default_datastore()

    While executing above script, I get the following error (I can access the workspace, however I cannot access the datastore). 


    Traceback (most recent call last):
      File "test.py", line 21, in <module>
        def_data_store = ws.get_default_datastore()
      File "XXX/.local/lib/python3.6/site-packages/azureml/core/workspace.py", line 783, in get_default_datastore
        return _DatastoreClient.get_default(self)
      File "XXX.local/lib/python3.6/site-packages/azureml/data/datastore_client.py", line 513, in get_default
        return _DatastoreClient._get_default(workspace)
      File "XXX.local/lib/python3.6/site-packages/azureml/data/datastore_client.py", line 689, in _get_default
        custom_headers=_DatastoreClient._custom_headers)
      File "XXX/.local/lib/python3.6/site-packages/azureml/_restclient/operations/data_stores_operations.py", line 537, in get_default
        raise models.ErrorResponseException(self._deserialize, response)
    azureml._restclient.models.error_response.ErrorResponseException: Operation returned an invalid status code 'Forbidden'


    Thursday, November 14, 2019 10:06 AM

All replies

  • Hi,

    Can you please share the output of the following ws.get_details() to check.

    Thanks

    Thursday, November 14, 2019 12:40 PM
  • {'id': '/subscriptions/XXX/
    resourceGroups/SYSTEM/
    providers/Microsoft.MachineLearningServices/
    workspaces/w_0000001', 

    'name': 'w_0000001', 

    'location': 'westeurope',

    'type': 'Microsoft.MachineLearningServices/workspaces', 

    'sku': 'Basic', 
    'workspaceid': 'XXXa547', '

    description': '', 

    'friendlyName': 'w_0000001',

    'creationTime': '2019-11-13T19:19:24.2876625+00:00',

    'containerRegistry': '/subscriptions/XXX/
    resourceGroups/SYSTEM/
    providers/Microsoft.ContainerRegistry/
    registries/w0000001XXX', 

    'keyVault': '/subscriptions/XXX/
    resourcegroups/system/
    providers/microsoft.keyvault/
    vaults/w0000001keyvaultXXX', 

    'applicationInsights': '/subscriptions/XXX/
    resourcegroups/system/
    providers/microsoft.insights/
    components/w0000001insightsXXX', 

    'identityPrincipalId': 'XXX42b7',

    'identityTenantId': 'XXX29bf', 

    'identityType': 'SystemAssigned', 

    'storageAccount': '/subscriptions/XXX/
    resourcegroups/system/
    providers/microsoft.storage/
    storageaccounts/w0000001storageXXX'}
    Thursday, November 14, 2019 12:54 PM
  • Hi,

    Can you please confirm that you are using correct keys with access to your data storage, and that there are no firewall setting preventing your access?

    Regards,

    GiftA-MSFT.

    If a post helps to resolve your issue, please click “Mark as Answer” and/or “Vote as helpful”. By marking a post as Answered and/or Helpful, you help others find the answer faster.  Thanks.

    Thursday, November 14, 2019 7:22 PM
    Moderator