-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Microsoft Azure SDK for Node.js - Cognitive Services Spellcheck not working #4248
Comments
Thanks for opening this issue (and @amarzavery for moving it to the correct repo). It looks like this is an auth issue with the cognitive services REST endpoint for spellcheck. We apologize for not getting to this sooner while it was open in the other repo. @stephanbisser, if you're still watching this issue, can you let us know if this is still happening for you? |
Hi @kurtzeborn I need to check it and come back to you asap with the result! Thanks |
Hi @stephanbisser, Can you try again with the latest version of this SDK? https://www.npmjs.com/package/@azure/cognitiveservices-spellcheck Thanks, |
@sarangan12 If this doesnt repro with the latest re-generated code, then please close this issue |
Hi @stephanbisser, yeah that sample you found is a year old. The snippet below is current and working. Instructions on how to run are found here: https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/javascript/BingSpellCheck/bing_spell_check_quickstart.js
|
Closing the ticket given there has not been a response. Please re-open if this issue has not been resolved. Thanks, |
Thanks for working with Microsoft on GitHub! Tell us how you feel about your experience using the reactions on this comment. |
When trying to run the sample from https://www.npmjs.com/package/azure-cognitiveservices-spellcheck it creates the spellcheck services within my Azure sub but when I then try to call it with the following code snippet I get an empty result back:
This is the result and error I get logged out:
C:\Users\sbi\source\repos\testspellcheck>node spellcheck.js
{ _type: 'SpellCheck', flaggedTokens: [] }
C:\Users\sbi\source\repos\testspellcheck\spellcheck.js:49
console.log(result.flaggedTokens[0].token);
^
TypeError: Cannot read property 'token' of undefined
at client.spellChecker (C:\Users\sbi\source\repos\testspellcheck\spellcheck.js:49:39)
at client.pipeline (C:\Users\sbi\source\repos\testspellcheck\node_modules\azure-cognitiveservices-spellcheck\lib\spellCheckAPIClient.js:481:12)
at retryCallback (C:\Users\sbi\source\repos\testspellcheck\node_modules\ms-rest\lib\filters\systemErrorRetryPolicyFilter.js:89:9)
at retryCallback (C:\Users\sbi\source\repos\testspellcheck\node_modules\ms-rest\lib\filters\exponentialRetryPolicyFilter.js:140:9)
at C:\Users\sbi\source\repos\testspellcheck\node_modules\ms-rest\lib\filters\rpRegistrationFilter.js:59:14
at handleRedirect (C:\Users\sbi\source\repos\testspellcheck\node_modules\ms-rest\lib\filters\redirectFilter.js:39:9)
at C:\Users\sbi\source\repos\testspellcheck\node_modules\ms-rest\lib\filters\formDataFilter.js:23:14
at Request.defaultRequest [as _callback] (C:\Users\sbi\source\repos\testspellcheck\node_modules\ms-rest\lib\requestPipeline.js:125:16)
at Request.self.callback (C:\Users\sbi\source\repos\testspellcheck\node_modules\request\request.js:185:22)
at emitTwo (events.js:126:13)
The text was updated successfully, but these errors were encountered: