Asyncio error while running rasa shell

hi

I just started learning rasa. Following the tutorial Rasa Tutorial

Successfully installed rasa and trained the example model

while running rasa shell, facing the below error

Bot loaded. Type a message and press enter (use ‘/stop’ to exit): 2020-01-24 17:49:55 ERROR asyncio - Task exception was never retrieved future: <Task finished coro=<configure_app..run_cmdline_io() done, defined at c:\programdata\anaconda3\envs\servicenowchatbot\lib\site-packages\rasa\core\run.py:124> exception=RuntimeError(‘This event loop is already running’)> Traceback (most recent call last): File “c:\programdata\anaconda3\envs\servicenowchatbot\lib\site-packages\rasa\core\run.py”, line 128, in run_cmdline_io server_url=constants.DEFAULT_SERVER_FORMAT.format(“http”, port) File “c:\programdata\anaconda3\envs\servicenowchatbot\lib\site-packages\rasa\core\channels\console.py”, line 131, in record_messages text = get_user_input(button_question) File “c:\programdata\anaconda3\envs\servicenowchatbot\lib\site-packages\rasa\core\channels\console.py”, line 77, in get_user_input style=Style([(“qmark”, “#b373d6”), ("", “#b373d6”)]), File “c:\programdata\anaconda3\envs\servicenowchatbot\lib\site-packages\questionary\question.py”, line 45, in ask return self.unsafe_ask(patch_stdout) File “c:\programdata\anaconda3\envs\servicenowchatbot\lib\site-packages\questionary\question.py”, line 59, in unsafe_ask return self.application.run() File “c:\programdata\anaconda3\envs\servicenowchatbot\lib\site-packages\prompt_toolkit\application\application.py”, line 788, in run return get_event_loop().run_until_complete(self.run_async(pre_run=pre_run)) File “c:\programdata\anaconda3\envs\servicenowchatbot\lib\asyncio\base_events.py”, line 571, in run_until_complete self.run_forever() File “c:\programdata\anaconda3\envs\servicenowchatbot\lib\asyncio\base_events.py”, line 526, in run_forever raise RuntimeError(‘This event loop is already running’) RuntimeError: This event loop is already running Your input ->

Any help is much appreciated.

Hi @siriusraja, What version of rasa and asyncio do you have?

Hi Varun

Here are the versions rasa = 1.6.1

I am not able to see anything specific to asyncio. here are those that start with async

async-generator 1.10 async-timeout 3.0.1

Try installing asyncio==3.4.3. Try running rasa shell now.

Hi @varunsapre10

Tried installed asyncio. But still getting the same error.

Try creating a new rasa project by “rasa init”. If that doesn’t work, reinstall rasa. Don’t forget to install asyncio.

Thanks, Will try and let you know.

Hi @varunsapre10

Tried the below options

  1. creating a new project using rasa init
  2. reinstalling in the same virtual env
  3. created a new virtual env and installed

But same error persists.

1 Like