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

Utterence cannot be null #572

Closed
mjwsteenbergen opened this issue May 15, 2018 · 4 comments · Fixed by #582
Closed

Utterence cannot be null #572

mjwsteenbergen opened this issue May 15, 2018 · 4 comments · Fixed by #582
Labels
bug Indicates an unexpected problem or an unintended behavior.

Comments

@mjwsteenbergen
Copy link

At LuisRecognizer.cs#L58 there exists a line to check that the utterence is not null. However, when a user uploads a file (image,recording), there exists no such utterence. This results in an exception.

Tested in Telegram, Web Chat and Emulator

Full stacktrace:

   at Microsoft.Bot.Builder.Ai.LUIS.LuisRecognizer.RecognizeInternal(String utterance, CancellationToken ct)
   at Microsoft.Bot.Builder.Ai.LUIS.LuisRecognizer.<Recognize>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Bot.Builder.Ai.LUIS.LuisRecognizerMiddleware.<OnTurn>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Bot.Builder.Core.Extensions.CatchExceptionMiddleware`1.<OnTurn>d__2.MoveNext()

I implemented LUIS following the bot framework tutorial

@drub0y drub0y added the bug Indicates an unexpected problem or an unintended behavior. label May 16, 2018
@drub0y drub0y changed the title [Bug] Utterence cannot be null Utterence cannot be null May 16, 2018
@cleemullins
Copy link
Contributor

Good Catch.

@emadelwany, could you take a look and confirm the correct behavior?

@emadelwany
Copy link
Contributor

I think the recognizer is doing the right thing, but perhaps the middleware should do extra checks before calling the recognizer. Currently it only checks that the activity type is Message, I'll update it to also only invoke the recognizer if the message text is not null/empty.

@SHUBHAMARORA731
Copy link

I am facing the same issue using the latest package from NuGet . when can we expect the next release of the package including this resolution.

@FrancescoAntonelli
Copy link

Hi when is planned the merge of this issue?
Thanks
Francesco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or an unintended behavior.
Projects
None yet
6 participants