Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resource not foun - 01a - Image Analysis with Computer Vision #21

Open
MichielBbal opened this issue Dec 31, 2020 · 1 comment
Open

Comments

@MichielBbal
Copy link

MichielBbal commented Dec 31, 2020

I use anaconda to run 01a - Image Analysis with Computer Vision.ipynb.

I get a 'resource not found' error, however the store_cam1.jpg file is in the right folder.

Here is the code:
from azure.cognitiveservices.vision.computervision import ComputerVisionClient
from msrest.authentication import CognitiveServicesCredentials
from python_code import vision
import os
%matplotlib inline

'# Get the path to an image file
image_path = os.path.join('data', 'vision', 'store_cam1.jpg')

'# Get a client for the computer vision service
computervision_client = ComputerVisionClient(cog_endpoint, CognitiveServicesCredentials(cog_key))

'# Get a description from the computer vision service
image_stream = open(image_path, "rb")#
description = computervision_client.describe_image_in_stream(image_stream)

'# Display image and caption (code in helper_scripts/vision.py)
vision.show_image_caption(image_path, description)

Here is the error message:


ComputerVisionErrorException Traceback (most recent call last)
in
13 # Get a description from the computer vision service
14 image_stream = open(image_path, "rb")#
---> 15 description = computervision_client.describe_image_in_stream(image_stream)
16
17 # Display image and caption (code in helper_scripts/vision.py)

~\Anaconda3\lib\site-packages\azure\cognitiveservices\vision\computervision\operations_computer_vision_client_operations.py in describe_image_in_stream(self, image, max_candidates, language, description_exclude, custom_headers, raw, callback, **operation_config)
1100
1101 if response.status_code not in [200]:
-> 1102 raise models.ComputerVisionErrorException(self._deserialize, response)
1103
1104 deserialized = None

ComputerVisionErrorException: Operation returned an invalid status code 'Resource Not Found'

@MichielBbal
Copy link
Author

MichielBbal commented Dec 31, 2020

And in Azure ML studio I get the same error.... and you can see I have the store_cam1.jpg in the right folder

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant