Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.59k stars 2.8k forks source link

'Access Denied' - when accessing the custom vision - microsoft azure #2800

Closed abhishekkumar123090 closed 6 years ago

abhishekkumar123090 commented 6 years ago

Hello all,

I got the following error while creating a custom model using the python (given on https://docs.microsoft.com/en-us/azure/cognitive-services/Custom-Vision-Service/python-tutorial) and is getting the below error. So why is the access denied? Is it because of the API-key or something else?

Traceback (most recent call last): File "train_cm.py", line 12, in project = trainer.create_project("PneumoniaNormal") File "C:\Users\Asus\AppData\Local\Programs\Python\Python36\lib\site-packages\azure\cognitiveservices\vision\customvision\training\training_api.py", line 1537, in create_project raise HttpOperationError(self._deserialize, response) msrest.exceptions.HttpOperationError: Operation returned an invalid status code 'Access Denied'

lmazuel commented 6 years ago

@areddish to the rescue please :)

areddish commented 6 years ago

Hello @abhishekkumar123090,

There are two was to get this type of error: 1) You could be missing the API key - make sure to get your training key off the portal settings page from customvision.ai and putting that value into training_key. 2) You could be hitting the limit to the number of projects you are able to create. To check this, log into the customvision.ai portal and click on the setting (gear icon) on the upper right. Then you'll see the number of projects you have created vs the number you are able to create.

lmazuel commented 6 years ago

Closing for inactivity, and since I believe the answer is accurate. Feel free to still comment or create new issue if necessary.