Custom actions failed error

ERROR: rasa_core.actions.action:Failed to run custom action ‘actions.GetAnswer’. Couldn’t connect to the server at ‘https://localhost:5055/webhook’. Is the server running? Error: HTTPSConnectionPool(host=‘localhost’, port=5055): Max retries exceeded with url: /webhook (Caused by SSLError(SSLError(1, ‘[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:852)’),))

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

I am getting no response for the custom action while running the bot and the above errors while interactively training the bot. This bot is supposed to answer faqs about github . The bot needs to identify the intent and fetch the answer from the faq.csv file. Can someone please help me out? Thanks in advance!

I have attached the custom action file here.

actions.py (1.2 KB)

error while running the interactive training file

error in the custom actions server:

@Juste @akelad @souvikg10

you seem to be getting some sort of SSL error. What are the contents of your endpoints.yml?

I am sorry for the late reply @akelad

contents of the endpoints.yml file :

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

Your error log seems to state it’s connecting to “https://localhost:5055/webhook” – are you sure your endpoitns yaml doesn’t contain the https version?

Try rerunning with the http version fo the url

Thanks for the response. yes i am sure. on seeing your answer i’ve checked my interactive training python script . In the script i’ve mentioned https://localhost:5055/webhook by mistake . That’s the reason why i got that error

I’ve tried running the http version. I end up getting a different error. Could you please check it out

ERROR:rasa_core.actions.action:Failed to run custom action ‘actions.GetAnswer’. 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 ERROR:rasa_core.processor:Encountered an exception while running action ‘actions.GetAnswer’. Bot will continue, but the actions events are lost. Make sure to fix the exception in your custom code.

**contents of custom actions server error python -m rasa_core_sdk.endpoint --actions actions C:\Python\Python36\lib\site-packages\rasa_core_sdk_init_.py:12: UserWarning: The ‘rasa_core_sdk’ package has been renamed. You should change your imports to use ‘rasa_sdk’ instead. UserWarning, 2019-05-29 16:55:59 INFO rasa_sdk.endpoint - Starting action endpoint server… 2019-05-29 16:56:00 INFO rasa_sdk.executor - Registered function for ‘action_get_answer’. 2019-05-29 16:56:00 INFO rasa_sdk.endpoint - Action endpoint is up and running. on (‘0.0.0.0’, 5055) 2019-05-29 16:57:03 WARNING rasa_sdk.endpoint - Your versions of rasa and rasa_sdk might not be compatible. You are currently running rasa version 0.13.2 and rasa_sdk version 1.0.0. To ensure compatibility use the same version for both, modulo the last number, i.e. using version A.B.x the numbers A and B should be identical for both rasa and rasa_sdk. [2019-05-29 16:57:03,019] ERROR in app: Exception on /webhook [POST] Traceback (most recent call last): File “C:\Python\Python36\lib\site-packages\flask\app.py”, line 2292, in wsgi_app response = self.full_dispatch_request() File “C:\Python\Python36\lib\site-packages\flask\app.py”, line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File “C:\Python\Python36\lib\site-packages\flask_cors\extension.py”, line 161, in wrapped_function return cors_after_request(app.make_response(f(*args, **kwargs))) File “C:\Python\Python36\lib\site-packages\flask\app.py”, line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File “C:\Python\Python36\lib\site-packages\flask_compat.py”, line 35, in reraise raise value File “C:\Python\Python36\lib\site-packages\flask\app.py”, line 1813, in full_dispatch_request rv = self.dispatch_request() File “C:\Python\Python36\lib\site-packages\flask\app.py”, line 1799, in dispatch_request return self.view_functionsrule.endpoint File “C:\Python\Python36\lib\site-packages\flask_cors\decorator.py”, line 128, in wrapped_function resp = make_response(f(*args, **kwargs)) File “C:\Python\Python36\lib\site-packages\rasa_sdk\endpoint.py”, line 59, in webhook response = executor.run(action_call) File “C:\Python\Python36\lib\site-packages\rasa_sdk\executor.py”, line 237, in run “No registered Action found for name ‘{}’.”.format(action_name) Exception: No registered Action found for name ‘actions.GetAnswer’. 2019-05-29 16:57:03 ERROR flask.app - Exception on /webhook [POST] Traceback (most recent call last): File “C:\Python\Python36\lib\site-packages\flask\app.py”, line 2292, in wsgi_app response = self.full_dispatch_request() File “C:\Python\Python36\lib\site-packages\flask\app.py”, line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File “C:\Python\Python36\lib\site-packages\flask_cors\extension.py”, line 161, in wrapped_function return cors_after_request(app.make_response(f(*args, **kwargs))) File “C:\Python\Python36\lib\site-packages\flask\app.py”, line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File “C:\Python\Python36\lib\site-packages\flask_compat.py”, line 35, in reraise raise value File “C:\Python\Python36\lib\site-packages\flask\app.py”, line 1813, in full_dispatch_request rv = self.dispatch_request() File “C:\Python\Python36\lib\site-packages\flask\app.py”, line 1799, in dispatch_request return self.view_functionsrule.endpoint File “C:\Python\Python36\lib\site-packages\flask_cors\decorator.py”, line 128, in wrapped_function resp = make_response(f(*args, **kwargs)) File “C:\Python\Python36\lib\site-packages\rasa_sdk\endpoint.py”, line 59, in webhook response = executor.run(action_call) File “C:\Python\Python36\lib\site-packages\rasa_sdk\executor.py”, line 237, in run “No registered Action found for name ‘{}’.”.format(action_name) Exception: No registered Action found for name ‘actions.GetAnswer’. 127.0.0.1 - - [2019-05-29 16:57:03] “POST /webhook HTTP/1.1” 500 411 0.030870

thank you ! @akelad

Not sure which Rasa version you’re using, but actions should be referenced by their name(self) method. So instead of actions.GetAnswer it should be action_get_answer

1 Like

Hi @caroline_sahrudayi ,

Modify your utils.py in your source code of core on line 697 like this:

        return requests.request(method,
                                url,
                                verify=False,  # cancel ssl verify
                                headers=headers,
                                params=params,
                                auth=auth,
                                **kwargs)

tips: my core version is 0.14.4 Hope can help you~