Custom Action Error

My server is running. and this is my actions.py file:

from future import absolute_import

from future import division

from future import print_function

from future import unicode_literals

from rasa_core.actions import Action

from rasa_core.events import SlotSet

class ActionNavigation(Action):

def name(self):
    return 'action_navigation'


def run(self, dispatcher, tracker, domain):
    resp='Navigating to..'
    dispatcher.utter_message(resp)

but i am getting this error on server hit:

Exception: No registered Action found for name ‘action_navigation’.

127.0.0.1 - - [2018-11-28 15:16:37] “POST /webhook HTTP/1.1” 500 412 0.004362

Please help

@salman You should import actions and events from rasa_core_sdk rather than rasa core:

from rasa_core_sdk import Action
from rasa_core_sdk.events import SlotSet

That should allow you server to register the custom events.

2 Likes

Thanks alot. Problem resolved. I somehow messed up and imported that from rasa_core. Thanks again.

1 Like