Exception when trying to handle message.'h' is not in list when connecting to Telegram

I saw a post mentioning people faced an error when connecting to telegram about /start where they solved it by adding a start intent. I faced that problem, but I solved it using intent. However, the problem below shows error on ‘h’ and not 'start, I notice its similar error, so I tried adding an intent with the examples of value “h”. But it doesn’t work. Below is the error message

@AhChing11 Hello, Can I ask why you are using " " double quotes in the examples ? i.e “help” or “problem” etc please ref this link Rasa Playground and even remove ‘h’ and try again.

As Nik said - Try to remove the quotes.

Read more about quotes in YAML (there’s even a difference between ' and ") here.

1 Like

@ChrisRahme Okay I that stakeoverflow info is really helpful, thank you. However, i tried all 4 methods where i use “/h” ‘/h’ /h h as an example and then input use the input /h after training the model every time I make the changes to nlu.yml. It still shows me ValueError: 'h' is not in list. At the same time i also tried /help on all 4 times, and I get a reply every time. This is a screenshot of the result and the nlu.yml examples I’ve inserted

@nik202 Tried removing as shown in the screenshot above, still isn’t working, even in the CLI

@AhChing11 Why don’t you simple use this examples

intent: help
examples: |
 - can you help me?
 - please help me?
 - help me
 - if you can help me on this?
 - help help?

Why you want h , /h , and /help?

Please remove your example and try use suggested one and tell me please.

@AhChing11 Did you tried this? I am here for a while.

@nik202 /help and help input both are working in the CLI. I want to use h /h and /help because when i connect to Telegram, it shows the error similar to the one I’ve screenshot above, and it is also similar to the problem other people faced when they first connect to Telegram which is the “/start” problem. So based on the solution provided by the other thread on solving the “/start” problem, they said the simplest way is to add an start intent, so I figured, since it is a similar problem but this time is “h”, so I tried using intent to solve this issue. Yesterday it failed to work.

@AhChing11 can you share me config.yml file please? Its a uni-gram a single character that can be issue. Please share.

@AhChing11 Mean while please delete older trained model and train again and run please.

1 Like

@nik202 It is now working already when I run it just now :’), not sure why, but it is working. Thanks a lot nik, you are a life saviour.

@AhChing11 No worries mate, please close this thread as marking the solution for others. Happy to help you :slight_smile: and good luck and keep safe! I sometimes lucky :four_leaf_clover: also :stuck_out_tongue:

@nik202 ok the problem comes out again XD. Telegram is working all fine, response are working, but when i type /h, the error occur. I tried re run by stopping and running rasa run again, doesn’t work. I then tried delete old models, and retrain the model, try rasa run again, still doesn’t work. It seems to be keep sending the /h to the server, and when it detect /h, it crashes. Anyway to solve this? Below is my config.yml file

@AhChing11 strange, please check this on first rasa open source using shell or rasa x and then try using on Telegram. @AhChing11 share me the error screenshot for the same.

@nik202 using shell is fine, but when i connect to server, it crashes, even before I start typing anything. Below is the error occured

@nik202 It’s weird, but using the same solution for the problem “/start” people faced when first integrate on telegram where they create a start intent, this time i created a “h” intent, with a few examples, now it works. The intent I created is shown below.

  • image

@AhChing11 please mention

 - h

in domain.yml and train and try

But, we normally not mention single word intent, this not a right way to mention intents in conversational

@nik202 ahh yess, I included that code in my domain.yml as well. Now it’s working. Hmm… it’s not the right way, but i can’t find any other solutions :’), so I used /start error’s solution.

@AhChing11 congrts its working for you now :slight_smile:

1 Like