You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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'
The text was updated successfully, but these errors were encountered:
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'
The text was updated successfully, but these errors were encountered: