Custom Action not returning

Hello,

I am new to RASA.

When the intent that triggers my chat bots custom action the following error is returned.

“ERROR:rasa_core.processor:Encountered an exception while running action ‘action_show_time’. Bot will continue, but the actions events are lost. Make sure to fix the exception in your custom code.”

I have researched the issue and have seen this is a problem that affects many for various reasons. I have worked through the potential issues I have found and I am still confounded.

I am running via a jupyter notebook on Google Colab.

The Action Server is starting fine.

!nohup /usr/bin/python3 -m rasa_sdk.endpoint --actions actions --debug &

2022-03-08 21:03:38 INFO rasa_sdk.endpoint - Starting action endpoint server… 2022-03-08 21:03:38 INFO rasa_sdk.executor - Registered function for ‘action_show_time’. 2022-03-08 21:03:38 INFO rasa_sdk.endpoint - Action endpoint is up and running on http://0.0.0.0:5055 2022-03-08 21:03:38 DEBUG rasa_sdk.utils - Using the default number of Sanic workers (1)

My endpoint.yml follows:

This file contains the different endpoints your bot can use.

Server where the models are pulled from.

Model Storage

#models:

url: http://my-server.com/models/default_core@latest

wait_time_between_pulls: 10 # [optional](default: 100)

Server which runs your custom actions.

Custom Actions

#action_endpoint: url: “http://localhost:5055/webhook

url: “http://0.0.0.0:5055/webhook

Tracker store which is used to store the conversations.

By default the conversations are stored in memory.

Tracker Stores

#tracker_store:

type: redis

url: <host of the redis instance, e.g. localhost>

port: <port of your redis instance, usually 6379>

db: <number of your database within redis, e.g. 0>

password:

use_ssl: <whether or not the communication is encrypted, default false>

#tracker_store:

type: mongod

url: <url to your mongo instance, e.g. mongodb://localhost:27017>

db: <name of the db within your mongo instance, e.g. rasa>

username:

password:

I have referenced the endpoints in the agent.

agent = Agent.load(’./models/dialogue’, interpreter=model_directory, action_endpoint=’./endpoints.yml’)

My actions.py follows:

import datetime as dt from typing import Any, Text, Dict, List

from rasa_sdk import Action, Tracker from rasa_sdk.executor import CollectingDispatcher

class ActionHelloWorld(Action):

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

def run(self, dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:

dispatcher.utter_message(text=f"{dt.datetime.now()}")

     dispatcher.utter_message(text="Hello World!!")

    return []

My domain contains the action actions:

  • action_show_time
  • utter_happy
  • utter_greet
  • utter_menu
  • utter_destination_received
  • utter_enquiry
  • utter_toilet_location
  • utter_restaurant_enquiry
  • utter_goodbye
  • utter_thanks
  • utter_default

Thank you

Hey @jkoerner. Thank you for your question. Would you be able to edit your questions using the proper code and error log formatting? That will make it much easier to understand reproduce your issue.

1 Like