Can anyone help me solve this problem ,in rasa shell it gives me empty message

i am trying tp fetch data from csv file and what i am doing is taking a drug name from the user and searches its description from the csv file then display it…so if the drug name is found it displays but when the drug name is not found i make sure to thow an error message but in rasa it gives me emply like nothing message why is that?

This is almost likely a result of the system predicting an action_listen action. You can view and debug this by running:

rasa shell --debug

Take a look there and if you can’t find the source, please post that log here along with your stories.yml file.

@kearnsw here are what i get in the debug mood…it predicts well but not when the drug is not found in csv file where i want to throw an error to

So you’re trying to log the error using the dispatcher in the custom action (action_drugdescription)? It looks like the action was called, but no response was sent.

Do you see any errors on the action server? Can you share the custom action code?

FYI, it’s easier to assist if code snippets are provided in text form wrapped in triple quotes (```) rather than screenshots.

@kearnsw the custom actions code i posted in the first if u scrool up…actually i solved it thanks…instade i had a post last week where i tagged u but looks like u still didnt see it…here is the other issue

Looking at that code, it is an issue that nodescription is set as false and is never updated so there is no way to reach your elif statement. As I said, it’s difficult to provide support on screenshots as it’s not clear where to look and the code can’t be copied to reproduce.

@kearnsw okay …nlu_converted.yml (15.6 KB) stories_converted.yml (1.3 KB) actions.py (17.3 KB) config.yml (2.3 KB) domain.yml (9.1 KB) here are my files for the other issue to see it for me

Unfortunately, I’m not able to view those files on mobile and that other post has no details. Here is a post on how to ask a question on the forum in a way that is likely to get you the response you are looking for:

okay here another problem i have …am trying to get a normalized value of an entity duration that is extracted using duckling but gives me an error and dont know what i did wrong duration_value = next(tracker.get_latest_entity_values("duration" , None))["entities"]["additional_info"]["normalized"]

dispatcher.utter_message(text=int(duration_value)) and the error is this below

Traceback (most recent call last):
  File "c:\programdata\anaconda3\envs\rasabot\lib\site-packages\sanic\app.py", line 976, in handle_request
    response = await response
  File "C:\Users\hp\AppData\Roaming\Python\Python37\site-packages\rasa_sdk\endpoint.py", line 102, in webhook
    result = await executor.run(action_call)
  File "C:\Users\hp\AppData\Roaming\Python\Python37\site-packages\rasa_sdk\executor.py", line 390, in run
    action(dispatcher, tracker, domain)
  File "C:\Users\hp\Documents\faiza\rasa\actions.py", line 202, in run
    duration_value = next(tracker.get_latest_entity_values("duration" , None))["entities"]["additional_info"]["normalized"]
TypeError: 'int' object is not subscriptable

I’m not seeing the dispatcher.utter_message call mentioned in the error message, but I believe that should be cast as string.


dispatcher.utter_message(text=str(duration_value))

For the error you are receiving, it appears one of the following is of type integer:

next(tracker.get_latest_entity_values("duration" , None))

or

next(tracker.get_latest_entity_values("duration" , None))["entities"]

or

next(tracker.get_latest_entity_values("duration" , None))["entities"]["additional_info"]

I’d suggest using the debugger in your IDE or print statements to explore the object returned by next(tracker.get_latest_entity_values("duration" , None)). My guess is that this value itself is of type int.

@kearnsw Yes it is a type integer…here is the rasa nlu shell where how the values are.

@kearnsw…is there another way to get the normalised value as u see from the picture…