Facing problem executing custom actions

2018-09-27 12:21:59 ERROR rasa_core.actions.action - Failed to run custom action ‘action_example’. Action server responded with a non 200 status code of 500. Make sure your action server properly runs actions and returns a 200 once the action is executed. Error: 500 Server Error: INTERNAL SERVER ERROR for url: http://localhost:5055/webhook 2018-09-27 12:21:59 ERROR rasa_core.processor - Encountered an exception while running action ‘action_example’. Bot will continue, but the actions events are lost. Make sure to fix the exception in your custom code. 2018-09-27 12:21:59 ERROR rasa_core.processor - Failed to execute custom action.

Hey did u got the issue. I am facing same problem

@neerajb1 Do you have your custom action ? can you please share that ?

Ya please get it below

class ActionAddingPoints(Action):

def name(self):
    return 'action_add_points'
def run(self, dispatcher, tracker, domain):

   
    response = """Your points added for. Enjoy !!"""
    dispatcher.utter_message(response)

Hi Got it. I was forgot to add enable api.

Thank you :slight_smile:

great to here that, you have to start endpoints and the start run rasa core. be carefull will with path of actions

I am having: Traceback (most recent call last): File “/Users/brijeshlakkad/Library/Python/2.7/lib/python/site-packages/rasa_core/processor.py”, line 323, in _run_action events = action.run(dispatcher, tracker, self.domain) File “/Users/brijeshlakkad/Library/Python/2.7/lib/python/site-packages/rasa_core/actions/action.py”, line 323, in run raise Exception(“Failed to execute custom action.”) Exception: Failed to execute custom action. 127.0.0.1 - - [2018-10-21 20:32:30] “POST /webhooks/rest/webhook?stream=true&token= HTTP/1.1” 200 212 0.216400

Can anyone please help me? thank you

@Brijeshlakkad you must have yourr actions.py and then run the two lines on different command lines.

1-python -m rasa_core_sdk.endpoint --actions actions

2-python -m rasa_core.run -d models/dialogue -u models/nlu --endpoints endpoints.yml````
5 Likes

Thanks. It worked!

1 Like

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

As You told, I am running these two lines on two different command lines. Then I am getting this error.

python -m rasa_core.run -d models/dialogue -u models/nlu --endpoints endpoints.yml 2019-05-11 11:09:11 INFO root - Rasa process starting 2019-05-11 11:09:22 INFO rasa_nlu.components - Added ‘nlp_spacy’ to component cache. Key ‘nlp_spacy-en’. 2019-05-11 11:09:27.149640: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 2019-05-11 11:09:28 INFO root - Rasa Core server is up and running on http://localhost:5005 Traceback (most recent call last): File “C:\Program Files\Python\lib\runpy.py”, line 193, in _run_module_as_main “main”, mod_spec) File “C:\Program Files\Python\lib\runpy.py”, line 85, in _run_code exec(code, run_globals) File “C:\Program Files\Python\lib\site-packages\rasa_core\run.py”, line 260, in cmdline_args.jwt_method) File “C:\Program Files\Python\lib\site-packages\rasa_core\run.py”, line 194, in serve_application jwt_secret, jwt_method) File “C:\Program Files\Python\lib\site-packages\rasa_core\run.py”, line 173, in start_server http_server.start() File “C:\Program Files\Python\lib\site-packages\gevent\baseserver.py”, line 305, in start self.init_socket() File “C:\Program Files\Python\lib\site-packages\gevent\pywsgi.py”, line 1490, in init_socket StreamServer.init_socket(self) File “C:\Program Files\Python\lib\site-packages\gevent\server.py”, line 146, in init_socket self.socket = self.get_listener(self.address, self.backlog, self.family) File “C:\Program Files\Python\lib\site-packages\gevent\server.py”, line 157, in get_listener return _tcp_listener(address, backlog=backlog, reuse_addr=cls.reuse_addr, family=family) File “C:\Program Files\Python\lib\site-packages\gevent\server.py”, line 256, in _tcp_listener sock.bind(address) OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted: (‘0.0.0.0’, 5005)

can you correct the intent i can read it

I was forgot to add enable api. what do you exactly can you explain for me I have the same issue I do not know how to solve it

are you using rasa x ?

1 Like

yes of corse

Hi @azizullah2017

I’m using RASA X and facing the same issue. I’m executing the following commands

  1. rasa run actions
  2. rasa shell --debug

Following is my error

Could you please help me solve my error?

Thanks in advance.

you forget to add the name of your actions in you domain file and you must add it also stories can just publish to have full idea .

Thanks for your response. @hajoura I have it both in the actions in the domain file and the stories file.

domain.yml:

actions:

  • action_send_apt_msg

stories.md:

  • sendaptmsg
    • action_send_apt_msg

I have this in my actions.py:

def name(self): return ‘send_apt_msg’

It works when I return ‘action_send_apt_msg’ instead of ‘send_apt_msg’ in the name function.

Thanks!

Hey @Mounika can you tell me how did you solve this issue?