Custom action resonse is good but it das not have a response

hi, am working on my rasa project in rasa x now so I can see what he is doing. You can see this in this picture(

The problem is that It have to send something back and that is the time.

this is my code in my custom actions:

class actionshowtime(Action):

    def name(self) -> Text:
        return "action_show_time"

    def run(self, dispatcher: CollectingDispatcher,
            tracker: Tracker,
            domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
        current_place = next(tracker.get_latest_entity_values("place"), None)
        utc = arrow.utcnow()

        if not current_place:
            msg = f"it's {utc.format('HH:mm')} utc now. You can also gice me a place."
            return []

        tz_string = city_db.get(current_place, None)
        if not tz_string:
            msg = f"it's i didn't recognize {current_place}. can you say it aging?"
            return []

        msg = f"it's {[current_place]).format('HH:mm')} in {current_place} now."

        return []

Hey there,

When you run it locally does it return the time?

Yeah, sometimes Rasa X just does not display the message :confused:

If you have another interface for it you can use it instead.

Just in case, please execute rasa --version and post the results.

Rasa Version : 2.8.3

Minimum Compatible Version: 2.8.0

Rasa SDK Version : 2.8.1

Rasa X Version : 0.39.3

Python Version : 3.8.0

Operating System : Windows-10

Python Path : c:\users\sebastiaan\appdata\local\programs\python\python38\python.exe


If it doesn’t work when running it locally then I would suggest checking your domain.yml and nlu.yml. Could you paste part of these files here, please?

nlu.yml (5.8 KB) domain.yml (2.2 KB)

there you go

Ok, I am not sure if this could affect but please change the name of the class following the Camelcase rule. Second, add a print statement inside the class run function and check if your actions are accessed.

1 Like

hi thanks, i am working on it right now. when I try to train the model I get this error: Core training was skipped because no valid domain file was found. Only an NLU-model was created. Please specify a valid domain using the ‘–domain’ argument or check if the provided domain file exists.

how can I fix this because if have a domain.yml domain.yml (2.3 KB)

I have come up with this error too but I don’t remember I did something special to solve it. By checking your domain.yml file, in “actions” sector you should add the name of the actions, not the name of the classes. I think this should fix this error.

i have change it can you take a look if this is good. the error is still there.

actions: (4.7 KB)

Domain:domain.yml (2.1 KB)

“actions” sector in the domain.yml looks the same as before. Based on this

you should add: actions:

  • utter_did_that_help
  • utter_cheer_up
  • utter_goodbye
  • utter_greet
  • utter_happy
  • utter_i_am_a_bot
  • action_show_time

Hey, I faced a similar problem to this, I think it might help you too. But can you share the whole program file so that i can examine the other files?

hi i dont knwo why the domain.yml whas not update but the problem Is still there.

Please check this thread Rasa domain file not found - #3 by nikhilcss97 .

You should probably check your domain file structure.

@anonymous023 If you are still having problems, share the program files and I will try to help. You can post the updated version on github or here.

hi you can download the code hear: Jarvis01 – Google Drive

Did someone already find a solution?

BDW thanks for all the help so far.