Interactive Training : No registered Action found for name 'action_weather'

(Shammy45) #1

I have a simple custom action, code given below

from future import absolute_import from future import division from future import unicode_literals

from rasa_core.actions.action import Action from import SlotSet

class ActionWeather(Action): def name(self): return ‘action_weather’

def run(self, dispatcher, tracker, domain):

response = "wether is absolutely fantastic"
return [SlotSet('location',loc)]

While running the interactive training , I get this following error message ( is stored in a folder called action)

bash-3.2$ python -m rasa_core_sdk.endpoint --actions actions 2019-05-15 20:26:59 INFO main - Starting action endpoint server… 2019-05-15 20:27:10 INFO main - Action endpoint is up and running. on (‘’, 5055) [2019-05-15 20:28:04,605] ERROR in app: Exception on /webhook [POST] Traceback (most recent call last): File “/Users/admin/anaconda3/lib/python3.7/site-packages/flask/”, line 2292, in wsgi_app response = self.full_dispatch_request() File “/Users/admin/anaconda3/lib/python3.7/site-packages/flask/”, line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File “/Users/admin/anaconda3/lib/python3.7/site-packages/flask_cors/”, line 161, in wrapped_function return cors_after_request(app.make_response(f(*args, **kwargs))) File “/Users/admin/anaconda3/lib/python3.7/site-packages/flask/”, line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File “/Users/admin/anaconda3/lib/python3.7/site-packages/flask/”, line 35, in reraise raise value File “/Users/admin/anaconda3/lib/python3.7/site-packages/flask/”, line 1813, in full_dispatch_request rv = self.dispatch_request() File “/Users/admin/anaconda3/lib/python3.7/site-packages/flask/”, line 1799, in dispatch_request return self.view_functionsrule.endpoint File “/Users/admin/anaconda3/lib/python3.7/site-packages/flask_cors/”, line 128, in wrapped_function resp = make_response(f(*args, **kwargs)) File “/Users/admin/anaconda3/lib/python3.7/site-packages/rasa_core_sdk/”, line 59, in webhook response = File “/Users/admin/anaconda3/lib/python3.7/site-packages/rasa_core_sdk/”, line 177, in run “No registered Action found for name ‘{}’.”.format(action_name) Exception: No registered Action found for name ‘action_weather’.

(Shammy45) #2

By changing the package it got fixed from rasa_core_sdk import Action from import SlotSet