Received an action call without an action - RASA Custom action, Post Request

Hello, I am receiving the error that “Received a call without an action” and my custom action is not dispatching the message to my bot…

In domain.yml:

//////////////////////////////////////

actions:

  • utter_greet
  • action_main

//////////////////////////////////////

In actions.py: ////////////////////////////////////// from rasa_sdk import Action from rasa_sdk.events import SlotSet from datetime import datetime from crontab import CronTab import schedule import time

class ActionMain(Action):

def name(self):
    return "action_main"


def run(self, dispatcher, tracker, domain):
    
    dispatcher.utter_message("Our chatbot is live")

    return []

//////////////////////////////////////

Post request: import requests

import json

url = ‘http://localhost:5055/webhook

#url = “http://localhost:5055/conversations/default/execute

headers = {‘Content-type’: ‘application/json’}

dx = json.dumps({“name”: “action_main”})

requests.post(url, data=dx, headers=headers)

//////////////////////////////////////////////////////////////

However when I do the post request my rasa server says:

2019-11-05 18:01:41 WARNING rasa_sdk.endpoint - You are using an old version of rasa which might not be compatible with this version of rasa_sdk (1.4.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-11-05 18:01:41 WARNING rasa_sdk.executor - Received an action call without an action.

127.0.0.1 - - [2019-11-05 18:01:41] “POST /webhook HTTP/1.1” 200 144 0.001549 ////////////

Please help !

Is the action in your domain?

In your code #url = “http://localhost:5055/conversations/default/execute” is commented out, but that should be the url you want to use. Which rasa version are you using? Any logs from rasa which might give any insights?

Hey Tobias, I ran an issue on this on Github and got it fixed after working with Ella. You are right about the domain - also, the domain wont run if we are using “rasa shell”, we need to use rasa x or another front end.

However, any idea on how to send bot initiated messages? Or not perform action_listen after a particular story/period of time? As I’m now able to call the POST request but the bot doesn’t send a message because its on action_listen…

What do you mean by that?

However, any idea on how to send bot initiated messages?

Have you seen this docs page Actions ?

Well if we try to run /conversations/default/execute when we’re developing with the rasa shell activated, the endpoint wont execute - it’ll say there’s too many connections (max pooled). So I’ve switched over to rasa x, and now my endpoint works.

I have successfully incorporated Custom actions (have read the link you’ve shared extensively), but my bot never initiates a conversation on the chat because it’s always on the “action_listen” mode - which means any action where I dispatch a message never gets executed. That’s what I’ve been trying to accomplish !

Well if we try to run /conversations/default/execute when we’re developing with the rasa shell activated, the endpoint wont execute - it’ll say there’s too many connections (max pooled). So I’ve switched over to rasa x, and now my endpoint works.

Mhm, which rasa version are you running?

I have successfully incorporated Custom actions (have read the link you’ve shared extensively), but my bot never initiates a conversation on the chat because it’s always on the “action_listen” mode

So there was no prior user interaction? What does the action which you execute do?