Exception: The model predicted the custom action 'action_check_status' but you didn't configure an endpoint to run this custom action

Rasa Core version : rasa-core==0.11.11 rasa-core-sdk==0.11.5 rasa-nlu==0.13.6

Python version : 3.6.3

Operating system (windows, osx, …): Mac OSX 10.11.16

WARNING:rasa_core.agent:Passing a text to `agent.handle_message(...)` is deprecated. Rather use `agent.handle_text(...)`.
ERROR:rasa_core.processor:Encountered an exception while running action 'action_check_status'. Bot will continue, but the actions events are lost. Make sure to fix the exception in your custom code.
ERROR:rasa_core.processor:The model predicted the custom action 'action_check_status' but you didn't configure an endpoint to run this custom action. Please take a look at the docs and set an endpoint configuration. https://rasa.com/docs/core/customactions/
Traceback (most recent call last):
  File "/Users/DHarun/anaconda3/envs/x/lib/python3.6/site-packages/rasa_core/processor.py", line 338, in _run_action
    events = action.run(dispatcher, tracker, self.domain)
  File "/Users/DHarun/anaconda3/envs/x/lib/python3.6/site-packages/rasa_core/actions/action.py", line 305, in run
    "".format(self.name(), DOCS_BASE_URL))
Exception: The model predicted the custom action 'action_check_status' but you didn't configure an endpoint to run this custom action. Please take a look at the docs and set an endpoint configuration. https://rasa.com/docs/core/customactions/

Content of domain file (if used & relevant): endpoints.yml

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

Info about server for custom actions:

$ python -m rasa_core_sdk.endpoint --actions actions
INFO:__main__:Starting action endpoint server...
INFO:rasa_core_sdk.executor:Registered function for 'action_check_status'.
INFO:__main__:Action endpoint is up and running. on ('0.0.0.0', 5055)

I use to develop rasa chatbot the anaconda environment. I have a virtuell environment form the anaconda nagivator, I create from this two terminals: first, start the server and the second to start the bot: bot.py --endpoints endpoints.yml

the code for the bot:

import logging,  warnings
from rasa_nlu.training_data import load_data
from rasa_nlu.config import RasaNLUModelConfig
from rasa_nlu.model import Trainer
from rasa_core.policies.keras_policy import KerasPolicy
from rasa_core.agent import Agent

logging.basicConfig(level="INFO")
warnings.filterwarnings('ignore')


agent = Agent('domain.yml', policies=[KerasPolicy()])
training_data = agent.load_data('stories.md')
agent.train(
        training_data,
        validation_split=0.0,
        epochs=400
)

agent.persist('models/dialogue')


training_data = load_data('nlu.md')
pipeline = [{"name": "nlp_spacy"},
            {"name": "tokenizer_spacy"},
            {"name": "intent_featurizer_spacy"},
            {"name": "intent_classifier_sklearn"}]

trainer = Trainer(RasaNLUModelConfig({"pipeline": pipeline}))
interpreter = trainer.train(training_data)

model_directory = trainer.persist('./projects/default/')
agent = Agent.load('models/dialogue', interpreter=model_directory)


print("Your bot is ready to talk! Type your messages here or send 'stop'")
while True:
    a = input()
    if a == 'stop':
        break
    responses = agent.handle_message(a)
    for response in responses:
        print(response["text"])

I cant start the custom actions, how can I solve this issue? Thanks.

If you’re running a script, you have to specify an EndpointConfig yourself. Take a look at the run script to see how

can you give pls more information about your suggestion? @akelad

https://rasa.com/docs/core/customactions/#custom-actions

Hi hd_YYYYYYY,

In addition to what akelad said, I think you might also have an error in your endpoints.yml file, which differs in a small, but important way, from the examples in the documentation.

You said that your file had this in it…

action_endpoint:
url: "..."

But the docs have it as…

action_endpoint:
  url: "..."

Note the indentation before the url mapping. In YAML this is important, as indentation defines scope. You can try out both of the examples in the online YAML to JSON convertor. You’ll see that the example you posted has action_endpoint and url as siblings, whereas the indented example from the documentation has the url as a child of the action_endpoint.

Hope that helps!

Steve

ERROR:rasa.core.processor:Encountered an exception while running action ‘my_fallback_action’. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.

action.py rom typing import Any, Text, Dict, List from rasa_sdk import Action, Tracker from rasa_sdk.executor import CollectingDispatcher

class ActionFallback(Action):

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

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

    dispatcher.utter_default("I did not understand what your saying")

    return []

domain file:-

actions:

  • action_default_fallback
  • my_fallback_action
  • utter_default: utter_default:
    • text: I did not understand can please say it once again.

please solve my issue