Chatbot is not responding and it is getting hanged

I am building a bot which is getting hanged after loading. When I tried to check the reason, I found that on action server it is giving the following error.

(base) PS D:\manoj\Nucleus\Chatbot> rasa run actions
2020-03-14 16:35:07 INFO     rasa_sdk.endpoint  - Starting action endpoint server...
2020-03-14 16:35:07 INFO     rasa_sdk.executor  - Registered function for 'action_faq'.
Exception occurred while handling uri: 'http://localhost:5055/'
Traceback (most recent call last):
  File "d:\anaconda\lib\site-packages\sanic\app.py", line 918, in handle_request
    handler, args, kwargs, uri = self.router.get(request)
  File "d:\anaconda\lib\site-packages\sanic\router.py", line 407, in get
    return self._get(request.path, request.method, "")
  File "d:\anaconda\lib\site-packages\sanic\router.py", line 470, in _get
    raise NotFound("Requested URL {} not found".format(url))
sanic.exceptions.NotFound: Requested URL / not found
Exception occurred while handling uri: 'http://localhost:5055/webhook'
Traceback (most recent call last):
  File "d:\anaconda\lib\site-packages\sanic\app.py", line 918, in handle_request
    handler, args, kwargs, uri = self.router.get(request)
  File "d:\anaconda\lib\site-packages\sanic\router.py", line 407, in get
    return self._get(request.path, request.method, "")
  File "d:\anaconda\lib\site-packages\sanic\router.py", line 447, in _get
    raise method_not_supported
sanic.exceptions.MethodNotSupported: Method GET not allowed for URL /webhook

Please help here

I am also getting the following error:

Bot loaded. Visualisation at http://localhost:5006/visualization.html .
Type a message and press enter (press 'Ctr-c' to exit).
2020-03-14 17:04:48 ERROR    rasa.core.training.interactive  - An exception occurred while recording messages.
Traceback (most recent call last):
  File "d:\anaconda\lib\site-packages\rasa\core\training\interactive.py", line 1385, in record_messages
    await _enter_user_message(sender_id, endpoint)
  File "d:\anaconda\lib\site-packages\rasa\core\training\interactive.py", line 1226, in _enter_user_message
    message = await _ask_questions(question, sender_id, endpoint, lambda a: not a)
  File "d:\anaconda\lib\site-packages\rasa\core\training\interactive.py", line 310, in _ask_questions
    answers = questions.ask()
  File "d:\anaconda\lib\site-packages\questionary\question.py", line 45, in ask
    return self.unsafe_ask(patch_stdout)
  File "d:\anaconda\lib\site-packages\questionary\question.py", line 59, in unsafe_ask
    return self.application.run()
  File "d:\anaconda\lib\site-packages\prompt_toolkit\application\application.py", line 810, in run
    return loop.run_until_complete(self.run_async(pre_run=pre_run))
  File "d:\anaconda\lib\asyncio\base_events.py", line 570, in run_until_complete
    self.run_forever()
  File "d:\anaconda\lib\asyncio\base_events.py", line 525, in run_forever
    raise RuntimeError('This event loop is already running')
RuntimeError: This event loop is already running
2020-03-14 17:04:48 ERROR    asyncio  - Task exception was never retrieved
future: <Task finished coro=<_serve_application.<locals>.run_interactive_io() done, defined at d:\anaconda\lib\site-packages\rasa\core\training\interactive.py:1469> exception=RuntimeError('This event loop is already running')>
Traceback (most recent call last):
  File "d:\anaconda\lib\site-packages\rasa\core\training\interactive.py", line 1476, in run_interactive_io
    sender_id=uuid.uuid4().hex,
  File "d:\anaconda\lib\site-packages\rasa\core\training\interactive.py", line 1385, in record_messages
    await _enter_user_message(sender_id, endpoint)
  File "d:\anaconda\lib\site-packages\rasa\core\training\interactive.py", line 1226, in _enter_user_message
    message = await _ask_questions(question, sender_id, endpoint, lambda a: not a)
  File "d:\anaconda\lib\site-packages\rasa\core\training\interactive.py", line 310, in _ask_questions
    answers = questions.ask()
  File "d:\anaconda\lib\site-packages\questionary\question.py", line 45, in ask
    return self.unsafe_ask(patch_stdout)
  File "d:\anaconda\lib\site-packages\questionary\question.py", line 59, in unsafe_ask
    return self.application.run()
  File "d:\anaconda\lib\site-packages\prompt_toolkit\application\application.py", line 810, in run
    return loop.run_until_complete(self.run_async(pre_run=pre_run))
  File "d:\anaconda\lib\asyncio\base_events.py", line 570, in run_until_complete
    self.run_forever()
  File "d:\anaconda\lib\asyncio\base_events.py", line 525, in run_forever
    raise RuntimeError('This event loop is already running')
RuntimeError: This event loop is already running
? Your input ->

Can you please help on this error. How to solve this.

Thanks, Manoj Kumar

Hi @manojrustagi79, Can you post your endpoints.yml and the version of Rasa you are using?

When you get the error with the action server, how are you giving input to the bot, and what input did you give before seeing this error?

Please find below my endpoint.yaml file :slight_smile: action_endpoint: url: “http://localhost:5055/webhook

I am getting this error while starting the action server using the command: rasa run actions.

What version of rasa are you on? I saw the event loop error in an earlier version, but that must be from running rasa shell not rasa actions? Also, what I meant with what input did you give before seeing this error is did you start shell and actions simultaneously, and then give input via the shell ? Or are you doing a curl request? If the latter, what request are you sending?

@mloubser Now this issue has been resolved u can close this issue. There was some problem in setup and after re-installation of rasa it got solved. Thanks