RASA Custom Action Server is not working

I am new to RASA. In my bot, I have used custom actions in the actions.py file. It works fine in my local and I’m able to get results as expected. But when I deploy to GCP(Google Cloud Platform), the custom actions don’t get executed.

What I did:

  1. Followed the steps as told in Deploying Your Rasa Assistant

  2. Built the docker image and pushed it to the Docker Hub.

  3. created the docker-compose.override.yml file with the following content in /etc/rasa folder

     version: '3.4'
              image: '<docker_account_username>/<docker_repository_name>:<custom_image_tag>'
                  - './actions:/app/actions'
                - '5055'
                - rasa-production
  4. sudo docker-compose down (to shutdown the server)

  5. sudo docker-compose up -d (to start the server)

  6. On doing “docker ps”, I see that my action server status says “Restarting (1) 34 seconds ago”

On testing in RASA X UI in the cloud, all the intent based code works, but the actions don’t get executed.

Any help is highly appreciated. Stuck on this for days now.

just checked my docker container logs…

I get the error:

ModuleNotFoundError: No module named ‘typing_extensions’

I have the requirements.txt file in the actions folder which has this dependency.

Is there any way in which I need to restart this, so that I dont get this error.


I have the requirements.txt file in the actions folder which has this dependency

Did you install the dependency during the Docker image build?

Yes I did that.

Can you show your Dockerfile? Additionally, If you execute pip list within a container that you use along with your custom Docker image, can you see the typing_extensions on a list?

I believe there was a problem with my docker image. When I was created the new image it was not overriding the old image. So, I created a new image with a different tag, and deployed it. It works fine now.

My Docker File

# Extend the official Rasa SDK image
FROM rasa/rasa-sdk:2.1.2

# Use subdirectory as working directory

# Copy any additional custom requirements, if necessary (uncomment next line)
COPY actions/requirements-action.txt ./

# Change back to root user to install dependencies
USER root

# Install extra requirements for actions code, if necessary (uncomment next line)
RUN pip install -r requirements-action.txt

# Copy actions folder to working directory
COPY ./actions /app/actions

# By best practices, don't run the code with root user
USER 1001

hello @anarockin, error: ModuleNotFoundError: No module named ‘typing_extensions’ this error coming beacuse of typing_extensions not installed or missing in RASA-SDK image. use below docker file code for rasa actions server, hopefully this work (its work for me).

FROM rasa/rasa-sdk:2.1.2
COPY ./actions /app/actions
VOLUME /app/actions
USER root
**RUN pip install --no-cache-dir typing-extensions** 
USER 1001