Error message: 'you didn't configure an endpoint to run this custom action.' when creating an end-to-end app

I am new to the rasa. The bot (GitHub - RasaHQ/tutorial-knowledge-base: Integrating Rasa with a knowledge base to encode domain knowledge and resolve entities) worked as per expectation when I cloned the project, set up everything and executed the commands in the command-line interface as per the instructions given in the readme file.

But when I deployed the project to my local machine with flask, it’s not working properly and neither its getting failed. It’s throwing the below error message.

(base) C:\Project Work\Development\Case_Studies_2\Dummy_project1_knowledgebasegrakn>flask run -h 0.0.0.0 -p 5000 --no-reload

WARNING:tensorflow:From C:\Users\AppData\anaconda3\lib\site-packages\tensor2tensor\utils\adafactor.py:27: The name tf.train.Optimizer is deprecated. Please use tf.compat.v1.train.Optimizer instead.

WARNING:tensorflow:From C:\Users\AppData\anaconda3\lib\site-packages\tensor2tensor\utils\multistep_optimizer.py:32: The name tf.train.AdamOptimizer is deprecated. Please use tf.compat.v1.train.AdamOptimizer instead.

WARNING:tensorflow:From C:\Users\AppData\anaconda3\lib\site-packages\tensor2tensor\models\research\glow_init_hook.py:25: The name tf.train.SessionRunHook is deprecated. Please use tf.estimator.SessionRunHook instead.

WARNING:tensorflow:From C:\Users\AppData\anaconda3\lib\site-packages\tensor2tensor\models\research\neural_stack.py:51: The name tf.nn.rnn_cell.RNNCell is deprecated. Please use tf.compat.v1.nn.rnn_cell.RNNCell instead.

WARNING:tensorflow:From C:\Users\AppData\anaconda3\lib\site-packages\tensor2tensor\utils\trainer_lib.py:111: The name tf.OptimizerOptions is deprecated. Please use tf.compat.v1.OptimizerOptions instead.

WARNING:tensorflow:From C:\Users\AppData\anaconda3\lib\site-packages\tensor2tensor\utils\trainer_lib.py:111: The name tf.OptimizerOptions is deprecated. Please use tf.compat.v1.OptimizerOptions instead.

WARNING:tensorflow:From C:\Users\AppData\anaconda3\lib\site-packages\tensorflow_gan\python\estimator\tpu_gan_estimator.py:42: The name tf.estimator.tpu.TPUEstimator is deprecated. Please use tf.compat.v1.estimator.tpu.TPUEstimator instead.

WARNING:tensorflow:From C:\Users\AppData\anaconda3\lib\site-packages\tensorflow_gan\python\estimator\tpu_gan_estimator.py:42: The name tf.estimator.tpu.TPUEstimator is deprecated. Please use tf.compat.v1.estimator.tpu.TPUEstimator instead.

2020-02-28 16:50:24.535626: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 WARNING:tensorflow:From C:\Users\AppData\anaconda3\lib\site-packages\rasa\utils\train_utils.py:1269: The name tf.get_collection is deprecated. Please use tf.compat.v1.get_collection instead.

WARNING:tensorflow:From C:\Users\AppData\anaconda3\lib\site-packages\rasa\utils\train_utils.py:1269: The name tf.get_collection is deprecated. Please use tf.compat.v1.get_collection instead.

WARNING:tensorflow:From C:\Users\AppData\anaconda3\lib\site-packages\tensorflow_core\python\ops\init_ops.py:97: calling GlorotUniform.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version. Instructions for updating: Call initializer instance with the dtype argument instead of passing it to the constructor WARNING:tensorflow:From C:\Users\AppData\anaconda3\lib\site-packages\tensorflow_core\python\ops\init_ops.py:97: calling GlorotUniform.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version. Instructions for updating: Call initializer instance with the dtype argument instead of passing it to the constructor WARNING:tensorflow:From C:\Users\AppData\anaconda3\lib\site-packages\tensorflow_core\python\ops\init_ops.py:97: calling Orthogonal.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version. Instructions for updating: Call initializer instance with the dtype argument instead of passing it to the constructor WARNING:tensorflow:From C:\Users\AppData\anaconda3\lib\site-packages\tensorflow_core\python\ops\init_ops.py:97: calling Orthogonal.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version. Instructions for updating: Call initializer instance with the dtype argument instead of passing it to the constructor WARNING:tensorflow:From C:\Users\AppData\anaconda3\lib\site-packages\tensorflow_core\python\ops\init_ops.py:97: calling Zeros.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version. Instructions for updating: Call initializer instance with the dtype argument instead of passing it to the constructor WARNING:tensorflow:From C:\Users\AppData\anaconda3\lib\site-packages\tensorflow_core\python\ops\init_ops.py:97: calling Zeros.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version. Instructions for updating: Call initializer instance with the dtype argument instead of passing it to the constructor WARNING:tensorflow:From C:\Users\AppData\anaconda3\lib\site-packages\tensorflow_core\python\ops\resource_variable_ops.py:1630: calling BaseResourceVariable.init (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version. Instructions for updating: If using Keras pass *_constraint arguments to layers. WARNING:tensorflow:From C:\Users\AppData\anaconda3\lib\site-packages\tensorflow_core\python\ops\resource_variable_ops.py:1630: calling BaseResourceVariable.init (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version. Instructions for updating: If using Keras pass *_constraint arguments to layers. WARNING:tensorflow:From C:\Users\AppData\anaconda3\lib\site-packages\tensorflow_core\python\keras\backend.py:3994: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.where in 2.0, which has the same broadcast rule as np.where WARNING:tensorflow:From C:\Users\AppData\anaconda3\lib\site-packages\tensorflow_core\python\keras\backend.py:3994: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.where in 2.0, which has the same broadcast rule as np.where ----------- Agent loaded ------------- INFO:werkzeug: * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit) INFO:werkzeug:127.0.0.1 - - [28/Feb/2020 16:50:39] “GET /login HTTP/1.1” 401 - INFO:werkzeug:127.0.0.1 - - [28/Feb/2020 16:50:46] “GET /login HTTP/1.1” 404 - INFO:werkzeug:127.0.0.1 - - [28/Feb/2020 16:50:50] “GET / HTTP/1.1” 200 - INFO:werkzeug:127.0.0.1 - - [28/Feb/2020 16:50:50] “GET /static/css/styles.css HTTP/1.1” 200 - INFO:werkzeug:127.0.0.1 - - [28/Feb/2020 16:50:50] “GET /static/css/ey-design-system.css HTTP/1.1” 200 - INFO:werkzeug:127.0.0.1 - - [28/Feb/2020 16:50:50] “GET /static/scripts/chat_scripts.js HTTP/1.1” 200 - INFO:werkzeug:127.0.0.1 - - [28/Feb/2020 16:50:50] “GET /static/media/ey-logo.svg HTTP/1.1” 200 - INFO:werkzeug:127.0.0.1 - - [28/Feb/2020 16:50:50] “GET /static/media/ey-logo-with-tagline.svg HTTP/1.1” 200 - INFO:werkzeug:127.0.0.1 - - [28/Feb/2020 16:50:51] “GET /assets/fonts/EYFontLight.woff2 HTTP/1.1” 404 - INFO:werkzeug:127.0.0.1 - - [28/Feb/2020 16:50:51] “GET /assets/fonts/EYFontBold.woff2 HTTP/1.1” 404 - INFO:werkzeug:127.0.0.1 - - [28/Feb/2020 16:50:51] “GET /assets/fonts/EYFontRegular.woff2 HTTP/1.1” 404 - INFO:werkzeug:127.0.0.1 - - [28/Feb/2020 16:50:51] “GET /assets/fonts/EYFontLight.woff HTTP/1.1” 404 - INFO:werkzeug:127.0.0.1 - - [28/Feb/2020 16:50:51] “GET /assets/fonts/EYFontBold.woff HTTP/1.1” 404 - INFO:werkzeug:127.0.0.1 - - [28/Feb/2020 16:50:51] “GET /assets/fonts/EYFontRegular.woff HTTP/1.1” 404 - ERROR:rasa.core.actions.action:The model predicted the custom action ‘action_query_entities’, but you didn’t configure an endpoint to run this custom action. Please take a look at the docs and set an endpoint configuration via the --endpoints flag. Actions ERROR:rasa.core.processor:Encountered an exception while running action ‘action_query_entities’. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.

This is the model.py file that runs the rasa agent in order to run the chatbot application.

Create conversation id for the session and classes to save the conversation history

import datetime global conversation_id conversation_id = datetime.datetime.now() from .ashley import Message, db

Imports and class initializations for answer generation process

Import Agent class and load model

→ Should be done when server starts and not when the user starts a new conversation since it takes too long to load

from rasa.core.agent import Agent model_path = “rasa\models\20200227-211051.tar.gz” agent = Agent.load(model_path) print(“----------- Agent loaded -------------”)

import asyncio

Function that includes pipeline for answer generation and logging to conversation history

def GiveAnswer(question): question_timestamp = datetime.datetime.now() # Gets time before processing of user input starts

## Generate answer_dict
answer_dict = asyncio.run(agent.handle_text(question))

# Convert answer_dict to actual text answer
answer = []
for l in answer_dict:
    try:
        answer.append(l["text"])
    except KeyError:
        answer.append(l["image"])

# print(f"ANSWER: {answer}")
confidence = "CONF"


# answer, confidence = equal_ensemble.run(question)
# confidence = round(confidence, 2)
answer_timestamp = datetime.datetime.now()  # Gets time after the answer is given by the algorithms


### Add everything to conversation database
message = Message(conversation_id=conversation_id, question=question, question_timestamp=question_timestamp,
                  answer=str(answer), answer_timestamp=answer_timestamp, confidence=confidence)
db.session.add(message)
db.session.commit()

### Dict with all values to be shown in the chat interface
time = answer_timestamp.strftime("%H:%M")
response_dict = {"time": time, "answer": answer, "confidence": confidence}

return response_dict!

@kumar Can you please format the layout of your question properly, can’t spot the error right now. You can use code formatting to include all the code.