Explore text analytics Learn Module giving errors
Lawrence Magee
0
Reputation points
I am working on the Explore text analytics Lab in Learn and I was following the numbers: Create a Cognitive Services resource
Run Cloud Shell
Configure and run a client application
It should be reviewing a block of text and output sentiment scores
However when I ran ./analyze-text.ps1 review1.txt, which was given to me from the Lab exercise i got this error: help me Obi-wan, you're my only hope.
PS /home/lawrence/ai-900> ./analyze-text.ps1 review1.txt
***Detecting Language***
Invoke-RestMethod: /home/lawrence/ai-900/analyze-text.ps1:30
Line |
30 | $result = Invoke-RestMethod -Method Post `
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Name or service not known
ConvertFrom-Json: /home/lawrence/ai-900/analyze-text.ps1:35
Line |
35 | $analysis = ($result | ConvertFrom-Json)
| ~~~~~~~~~~~~~~~~
| Cannot bind argument to parameter 'InputObject' because it is null.
- Language:
- Code:
- Score:
***Finding Key Phrases***
Invoke-RestMethod: /home/lawrence/ai-900/analyze-text.ps1:54
Line |
54 | $result = Invoke-RestMethod -Method Post `
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Name or service not known
ConvertFrom-Json: /home/lawrence/ai-900/analyze-text.ps1:59
Line |
59 | $analysis = ($result | ConvertFrom-Json)
| ~~~~~~~~~~~~~~~~
| Cannot bind argument to parameter 'InputObject' because it is null.
- Key Phrases:
***Analyzing Sentiment***
Invoke-RestMethod: /home/lawrence/ai-900/analyze-text.ps1:80
Line |
80 | $result = Invoke-RestMethod -Method Post `
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Name or service not known
ConvertFrom-Json: /home/lawrence/ai-900/analyze-text.ps1:85
Line |
85 | $analysis = ($result | ConvertFrom-Json)
| ~~~~~~~~~~~~~~~~
| Cannot bind argument to parameter 'InputObject' because it is null.
- A sentiment based on these scores:
- Positive:
- Neutral:
- Negative:
***Identifying known entities***
Invoke-RestMethod: /home/lawrence/ai-900/analyze-text.ps1:106
Line |
106 | $result = Invoke-RestMethod -Method Post `
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Name or service not known
ConvertFrom-Json: /home/lawrence/ai-900/analyze-text.ps1:111
Line |
111 | $analysis = ($result | ConvertFrom-Json)
| ~~~~~~~~~~~~~~~~
| Cannot bind argument to parameter 'InputObject' because it is null.
InvalidOperation: /home/lawrence/ai-900/analyze-text.ps1:113
Line |
113 | $entities = $analysis.documents[0].entities
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot index into a null array.