Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Error when running analyze-image.ps in Azure Cloud Shell #27

Closed
charleswhchan opened this issue Apr 18, 2023 · 3 comments
Closed

Error when running analyze-image.ps in Azure Cloud Shell #27

charleswhchan opened this issue Apr 18, 2023 · 3 comments

Comments

@charleswhchan
Copy link

charleswhchan commented Apr 18, 2023

Module: Analyze images with the Computer Vision service

Lab/Demo: Exercise - Explore Computer Vision

Task: Configure and run a client application

Step: 6

Description of issue
When running the script in Azure Cloud Shell, received the follow error

PS /home/user1-30332935/ai-900> ./analyze-image.ps1 store-camera-1.jpg
Analyzing image...
Invoke-RestMethod: /home/user1-30332935/ai-900/analyze-image.ps1:21
Line |
  21 |  $result = Invoke-RestMethod -Method Post `
     |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | {"error":{"code":"404","message": "Resource not found"}}
ConvertFrom-Json: /home/user1-30332935/ai-900/analyze-image.ps1:26
Line |
  26 |  $analysis = $result | ConvertFrom-Json
     |                        ~~~~~~~~~~~~~~~~
     | Cannot bind argument to parameter 'InputObject' because it is null.

Description:

Objects in this image:

Tags relevant to this image:

Repro steps:
Follow the instructions in the lab.
PowerShell Version: 7.3.3

@charleswhchan charleswhchan mentioned this issue Apr 18, 2023
@charleswhchan charleswhchan changed the title analyze-image.ps Error when running analyze-image.ps in Azure Cloud Shell Apr 18, 2023
@Mihai-Ac
Copy link
Contributor

Hello @charleswhchan ,
I have ran through the lab two times (in two different VMs) and could not reproduce this error.
image

Have you tried restarting the cloud shell session and trying again? Does the error still occur? What about restarting the training session, doing that still raises this error?

Best regards,
Mihai

@charleswhchan
Copy link
Author

charleswhchan commented Apr 18, 2023

@Mihai-Ac : are there any command(s) that I can run within Cloud Shell to capture more information for debugging?

@charleswhchan
Copy link
Author

Works again after I restart the training session. So likely operator error. 😅

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

Successfully merging a pull request may close this issue.

2 participants