Open AhmadManzoor opened 1 year ago
Thanks for the feedback, As far as I am aware, the package azure-cognitiveservices-vision-customvision
is no longer maintained.
@kristapratico, would you happen to have any pointers to who could better assist?
In any case, I think some things that are worth checking are:
"Content-Type": "application/octet-stream"
in the ApiKeyCredentials. Not sure if that's causing an issue?thank you for your quick response ensure the endpoint : i am getting this from settings page under key and endpoint getting the project id from same page also tried without "Content-Type": "application/octet-stream getting same error
Describe the bug Tryiong to use custom model using python and getting following error Traceback (most recent call last): File "", line 2, in
File "/home/ahmad/.pyenv/versions/3.9.0/lib/python3.9/site-packages/azure/cognitiveservices/vision/customvision/prediction/operations/_custom_vision_prediction_client_operations.py", line 358, in detect_image
raise models.CustomVisionErrorException(self._deserialize, response)
azure.cognitiveservices.vision.customvision.prediction.models._models_py3.CustomVisionErrorException: Operation returned an invalid status code 'Access Denied'
To Reproduce Steps to reproduce the behavior: prediction_key = "3XXXXXXXXXXXXXXXXXXXXXXXX8" project_id = "XXXX-XXX-XXX-XXX-XXXXX" published_name = "Iteration2" endpoint = "https://.cognitiveservices.azure.com/"
image_data = req.files["image"]
This is how i am sending file files = {'image': <_io.BufferedReader name='/home/ahmad/Downloads/test.jpg'>} res = requests.post(furl , files=files)
Expected behavior clear and concise description of what you expected to happen. Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.