No message received from RASA custom action


I’ve been working on a custom bot which connects to Google Assistant, based on this tutorial: Going beyond hey Google. I have it up and running on Docker with my own domain data. However, when I tried to implement a custom action server in another container, the server is available, but dispatcher.utter_message() doesn’t return the message back to RASA to be forwarded to Google and close the loop.

As shown in the code, I also tried dispatcher.utter_template("utter_dummy", tracker) to check if that returns anything, but no luck. I believe the issue is that I’m not starting the action server correctly, as I don’t call rasa run actions, but when I tried to add this command in docker-compose I get:

“./ line 17: exec: actions: cannot execute: Is a directory”

The actions folder contains and

  • docker-compose:
version: '3.0'
    image: rasa/rasa:latest
      - ./:/app
      - 3001:5004
      # - train
      - run
      - --enable-api
      - -p
      - "5004"
    image: rasa/rasa-sdk:latest
      - 5055:5055
      - ./actions:/app/actions
  • endpoints.yml
  url: 'http://action_server:5055/webhook'
import requests
import json
from rasa_sdk import Action

class ActionTest(Action):
  def name(self):
    # define the name of the action
    return "action_joke"

  def run(self, dispatcher, tracker, domain):
    request = requests.get('').json()  # make an api call
    joke = request['value']['joke']  # extract a joke from returned json response
   # dispatcher.utter_template("utter_dummy", tracker)
    return []

What rasa version are you using?

Can you please try to specify your actions file directly? E.g. rasa run actions --actions actions/ Does that help?


I am having this same issue. I have set up a minimal Rasa stack using Docker Compose (I overwrote the rasa entrypoint on the rasa/rasa:latest-full image so I could use the commands within the container, since the official Rasa image has rasa as its ENTRYPOINT).

The current versions being pulled from Docker Hub are:

  • Rasa 1.5.0
  • rasa-sdk 1.5.0

After running rasa init to get a base project up and running, I changed the bot_challenge intent to run the custom hello world example action. I added a log statement to the run method of the hello world action. I know that a connection is being made between Rasa Core and the Actions Server, since I get the following output in the Action Server logs when triggering the bot_challenge intent.

However, there is no reply from dispatcher.utter_message. I am using rasa shell to chat with the bot.

2019-11-26 14:32:21 INFO     rasa_sdk.endpoint  - Starting action endpoint server...
2019-11-26 14:32:21 INFO     rasa_sdk.executor  - Registered function for 'action_hello_world'.
2019-11-26 14:32:21 INFO     sanic.root  - Goin' Fast @
2019-11-26 14:32:21 INFO     sanic.root  - Starting worker [1]
2019-11-26 14:32:33 INFO     actions.actions  - Hello world executed!
2019-11-26 14:32:33 INFO     sanic.access  - 

Any idea why this isn’t working? I can get the bot to respond outside of custom actions.

Here are the relevant files:


  # Rasa -----------------------------------------
    container_name: rasa
      context: $HOME/app/rasa/
      dockerfile: docker/Dockerfile
    command: tail -f /dev/null
      - 5005:5005
      - 5002:5002
      - $HOME/app/rasa:/app
    restart: always

  # Rasa Action Server--------------------------------
    container_name: rasa-actions
    image: rasa/rasa-sdk:latest
      - 5055:5055
      - $HOME/app/rasa/actions:/app/actions
    restart: always


import logging
from typing import Any, Text, Dict, List

from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher

# Define logger
log = logging.getLogger(__name__)

class ActionHelloWorld(Action):

    def name(self) -> Text:
        return "action_hello_world"

    def run(self, dispatcher: CollectingDispatcher, tracker: Tracker,
            domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:'Hello world executed!')

        dispatcher.utter_message("Hello World!")

        return []
1 Like

Hey Tanja, thanks for your reply. I am using rasa/rasa:latest and rasa/rasa-sdk:latest images from Docker Hub.

I also tried to build the command in docker-compose:

    image: rasa/rasa-sdk:latest
      - 5055:5055
      - ./actions:/app/actions
      - run 
      - actions 
      - --actions 
      - actions/

but still an error: action_server_1 | ./ line 17: exec: actions: cannot execute: Is a directory

Seems really similar to my issue. I also get INFO sanic.access - , but only when I use dispatcher.utter_template()

Hey @Tanja, any thoughts about this issue?


This solved this problem for me…

1 Like

Update rasa-sdk to 1.5.1

1 Like

Thanks for the replies and help! Works perfectly after updating.