Rasa 3.2 custom action not called when agent is loaded with action endpoint from another python file

This is my rasa version: Rasa Version : 3.2.6 Minimum Compatible Version: 3.0.0 Rasa SDK Version : 3.2.0 Python Version : 3.7.13 Operating System : Windows-10-10.0.19041-SP0

I have the following code to load agent in a python file - bot.py from rasa.core.agent import Agent from rasa.core.http_interpreter import RasaNLUHttpInterpreter from rasa.core.utils import AvailableEndpoints from rasa.utils.endpoints import EndpointConfig

… agent = Agent.load(model_path=path_to_model, action_endpoint=EndpointConfig(url=‘http://localhost:5055/webhook’))

Am running my action server with command - “rasa run actions” And it is showing the registered custom action like this - 2022-08-17 23:55:01 INFO rasa_sdk.endpoint - Starting action endpoint server… 2022-08-17 23:55:01 INFO rasa_sdk.executor - Registered function for ‘action_hello_world’. 2022-08-17 23:55:01 INFO rasa_sdk.endpoint - Action endpoint is up and running on http://0.0.0.0:5055

When I run the python file - it is showing the prediction of the custom action, but the endpoint is never called. All other utterances without custom action is working.

Again when I run rasa shell command its fine, custom action is getting picked up.

All this code was running fine with rasa 2.8, and its not working with rasa.

Please help with the correct syntax to run the agent with the actions endpoint in rasa 3.2. I have spent more than 16 hours to figure out this problem. All help is much appreciated.

1 Like

I am also experiencing this same issue. I am using the below:

  • Rasa Version : 3.2.10
  • Minimum Compatible Version: 3.0.0
  • Rasa SDK Version : 3.2.2
  • Python Version : 3.7.6
  • Operating System : Linux-5.10.133±x86_64-with-debian-9.12
  • Python Path : /usr/local/bin/python

Rasa clearly shows it successfuly connected to the action server and sends the message to the action end-point but the action server responds with the error

rasa.shared.exceptions.RasaException: Failed to run custom action ‘action_show_time’. Action server responded with a non 200 status code of None. Make sure your action server properly runs actions and returns a 200 once the action is executed. Error: Response payload is not completed