title: Encountering error running custom actions in rasa
body: <p>I recently started working on rasa. My chatbot is simple. Whenever a user asks a question, the bot filters data from a <code>sqlite3</code> database and return the result. I added the training examples, created stories for flow, and wrote a custom action to filter data from the database. for the custom action, I specified an endpoint and started the action server. This is my code so far</p>
  
  <h1>actions.py</h1>
  
  <pre><code>from typing import Any, Text, Dict, List
  from rasa_core_sdk import Action, Tracker
  import sqlite3
  
  class TestAction(Action):
  
      def name(self) -&gt; Text:
          return "action_testAction"
  
      def run(self, dispatcher, tracker, domain):
  
          UserId = tracker.get_slot('UserID')
          query = 'SELECT User_name FROM sales WHERE UserID=?'
  
          conn = sqlite3.connect("test.db")
          cursor = conn.cursor()
          cursor.execute(query, (UserId,))
          name = cursor.fetchall()
  
          msg = 'Hello {}!'.format(name)
          dispatcher.utter_message(msg)
  </code></pre>
  
  <h1>endpoints.yml</h1>
  
  <pre><code>action_endpoint:
    url: "http://localhost:5055/"
  </code></pre>
  
  <p>for running the endpoint, I ran the following code in a separate terminal window</p>
  
  <pre><code>python -m rasa_sdk --actions actions
  </code></pre>
  
  <p>But when I run the program with <code>rasa shell --endpoints endpoints.yml</code> command based on this <b><a href="https://stackoverflow.com/questions/56985323/rasa-custom-actions-not-connected">link</a></b>, I get the following error</p>
  
  <pre><code>rasa.core.processor  - Encountered an exception while running action 'action_testAction'. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.
  </code></pre>
  
  <p>This is what my action endpoint server returned</p>
  
  <pre><code>127.0.0.1 - - [2019-09-09 11:07:23] "POST / HTTP/1.1" 404 342 0.005443
  </code></pre>
  
  <p>I am not sure, what I am doing wrong. I checked the code actions.py file. I dont seem to have made any errors there.</p>
  
  <h1>[edit 1]</h1>
  
  <p>I was looking online and came across this <a href="https://medium.com/@bikashkumars/create-chatbot-using-rasa-part-1-67f68e89ddad" rel="nofollow noreferrer">tutorial</a>.</p>
  
  <p>In this tutorial, the endpoint is defined as</p>
  
  <pre><code>action_endpoint:   
      url: "http://localhost:5055/webhook"
  </code></pre>
  
  <p>Now i tried the same with my code. when I run the chatbot with the updated code, I get the following exception in the action_server</p>
  
  <pre><code>Exception: No registered Action found for name 'action_testAction'.
  </code></pre>
  
  <h1>[edit 2]</h1>
  
  <p>results of running the actions server i debug mode</p>
  
  <pre><code>(base) SASHAANKs-MacBook-Pro:speechbot2 sashaanksekar$ rasa run actions -vv
  2019-09-09 19:38:33 INFO     rasa_sdk.endpoint  - Starting action endpoint server...
  2019-09-09 19:38:38 INFO     rasa_sdk.endpoint  - Action endpoint is up and running. on ('0.0.0.0', 5055)
  2019-09-09 19:39:06 DEBUG    rasa_sdk.executor  - Received request to run 'action_testAction'
  2019-09-09 19:39:06 ERROR    flask.app  - Exception on /webhook [POST]
  Traceback (most recent call last):
    File "/Users/sashaanksekar/anaconda3/lib/python3.7/site-packages/flask/app.py", line 2292, in wsgi_app
      response = self.full_dispatch_request()
    File "/Users/sashaanksekar/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
      rv = self.handle_user_exception(e)
    File "/Users/sashaanksekar/anaconda3/lib/python3.7/site-packages/flask_cors/extension.py", line 161, in wrapped_function
      return cors_after_request(app.make_response(f(*args, **kwargs)))
    File "/Users/sashaanksekar/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1718, in handle_user_exception
      reraise(exc_type, exc_value, tb)
    File "/Users/sashaanksekar/anaconda3/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise
      raise value
    File "/Users/sashaanksekar/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
      rv = self.dispatch_request()
    File "/Users/sashaanksekar/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
      return self.view_functions[rule.endpoint](**req.view_args)
    File "/Users/sashaanksekar/anaconda3/lib/python3.7/site-packages/flask_cors/decorator.py", line 128, in wrapped_function
      resp = make_response(f(*args, **kwargs))
    File "/Users/sashaanksekar/anaconda3/lib/python3.7/site-packages/rasa_sdk/endpoint.py", line 59, in webhook
      response = executor.run(action_call)
    File "/Users/sashaanksekar/anaconda3/lib/python3.7/site-packages/rasa_sdk/executor.py", line 246, in run
      "No registered Action found for name '{}'.".format(action_name)
  Exception: No registered Action found for name 'action_testAction'.
  </code></pre>
  
  <p>Please help me</p>