ERROR asyncio - Task exception was never retrieve

I think the problem is just that you are not running the action server, see Actions

1 Like

@amn41 I receive this error even after running the action server. Could I get help to solve this iisue?

I am having the exact same problem – my action server is running fine. I’m using Windows 10, Python 3.6.8, Anaconda Prompt as the command line interface, and the latest version of Rasa. I’m using the formbot tutorial example exactly as written, and I get this error message:

2019-12-23 03:19:07 ERROR asyncio - Task exception was never retrieved future: <Task finished coro=<configure_app..run_cmdline_io() done, defined at c:\springboard\miniconda\envs\myenv\lib\site-packages\rasa\core\run.py:124> exception=RuntimeError(‘This event loop is already running’,)> Traceback (most recent call last): File “c:\springboard\miniconda\envs\myenv\lib\site-packages\rasa\core\run.py”, line 128, in run_cmdline_io server_url=constants.DEFAULT_SERVER_FORMAT.format(“http”, port) File “c:\springboard\miniconda\envs\myenv\lib\site-packages\rasa\core\channels\console.py”, line 131, in record_messages text = get_user_input(button_question) File “c:\springboard\miniconda\envs\myenv\lib\site-packages\rasa\core\channels\console.py”, line 77, in get_user_input style=Style([(“qmark”, “#b373d6”), ("", “#b373d6”)]), File “c:\springboard\miniconda\envs\myenv\lib\site-packages\questionary\question.py”, line 45, in ask return self.unsafe_ask(patch_stdout) File “c:\springboard\miniconda\envs\myenv\lib\site-packages\questionary\question.py”, line 59, in unsafe_ask return self.application.run() File “c:\springboard\miniconda\envs\myenv\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:\springboard\miniconda\envs\myenv\lib\asyncio\base_events.py”, line 471, in run_until_complete self.run_forever() File “c:\springboard\miniconda\envs\myenv\lib\asyncio\base_events.py”, line 425, in run_forever raise RuntimeError(‘This event loop is already running’) RuntimeError: This event loop is already running

1 Like

Did you get a solution for this? I am facing the same issue now but can’t find a solution!

1 Like

I had come across same issue as JGreenLowe. Uninstalling rasa and rasa-sdk and reinstalling rasa==1.4.3 , I did not got RuntimeError: This event loop is already running but I got Exception occurred while handling uri: ‘http://localhost:5005/webhooks/rest/webhook?stream=true&token=’ which was solved by following Rasa Shell error following tutorial · Issue #5019 · RasaHQ/rasa · GitHub .

pip3 uninstall rasa
pip3 uninstall rasa-sdk

And reinstall:
pip3 install rasa==1.4.3

After this run rasa shell:
if its working then its fine,

elif got uri exception then:
pip3 install sanic==19.9.0

else pass

Rasa offers to execute an action within 10 seconds while the event loop is running. It can be customized by changing

DEFAULT_STREAM_READING_TIMEOUT_IN_SECONDS = 10

in rasa.core.channels.console

4 Likes

Where can i change this rasa.core.channels.console?

Same problem. How can i solve it?

Hello, i solved this issue by fixing requirements.txt, adding bellow into requirements:

google-auth==1.10.1 
prompt-toolkit==2.0.10 
questionary==1.4.0 
SQLAlchemy==1.3.12 
urllib3==1.25.7

Refer to: python - I tried to run rasa shell i am getting ERROR asyncio Task exception was never retrieved future - Stack Overflow

2 Likes

thanks, it works for me

Thanks a lot .It worked out.

@cocofish it worked for me once but now it is showing the same error again after sometime

1 Like

I am using Windows 10 and running rasa 2.0. The fix for me was to run the command prompt in administrator mode. If i run command prompt under normal user mode, i was getting therror.

1 Like

How did you solve the error?

That’s what I needed! Thanks :+1:

your_project_name\Lib\site-packages\rasa\core\channels\console.py

Hoping to add this latest reply for fixing this issue.

it was enough downgrading only questionary to ==1.4.0 to solve the error.

it seems like it is not working for me, I am trying to upgrade to rasa 2.0 and I keep getting this error. when I change the questionary version to 1.4.0 it says it is not compatible, any suggestions?

Having the same error, for me it was enough to uninstall and install rasa again.

Hope it helps for someone!

1 Like

We have similar issue, please check the screenshot and error below

ERROR asyncio - Task exception was never retrieved future: <Task finished name=‘Task-2’ coro=<configure_app..run_cmdline_io() done, defined at /mnt/d/Jinay/Work-Sofftware/DATA/rasa-venv/lib/python3.8/site-packages/rasa/core/run.py:131> exception=TimeoutError()>

Task exception was never retrieved future: <Task finished name=‘Task-2’ coro=<configure_app..run_cmdline_io() done, defined at /mnt/d/Jinay/Work-Sofftware/DATA/rasa-venv/lib/python3.8/site-packages/rasa/core/run.py:131> exception=TimeoutError()> Traceback (most recent call last): File “/mnt/d/Jinay/Work-Sofftware/DATA/rasa-venv/lib/python3.8/site-packages/rasa/core/run.py”, line 135, in run_cmdline_io await console.record_messages( File “/mnt/d/Jinay/Work-Sofftware/DATA/rasa-venv/lib/python3.8/site-packages/rasa/core/channels/console.py”, line 182, in record_messages async for response in bot_responses: File “/mnt/d/Jinay/Work-Sofftware/DATA/rasa-venv/lib/python3.8/site-packages/rasa/core/channels/console.py”, line 137, in _send_message_receive_stream async for line in resp.content: File “/mnt/d/Jinay/Work-Sofftware/DATA/rasa-venv/lib/python3.8/site-packages/aiohttp/streams.py”, line 39, in anext rv = await self.read_func() File “/mnt/d/Jinay/Work-Sofftware/DATA/rasa-venv/lib/python3.8/site-packages/aiohttp/streams.py”, line 338, in readline await self._wait(“readline”) File “/mnt/d/Jinay/Work-Sofftware/DATA/rasa-venv/lib/python3.8/site-packages/aiohttp/streams.py”, line 306, in _wait await waiter File “/mnt/d/Jinay/Work-Sofftware/DATA/rasa-venv/lib/python3.8/site-packages/aiohttp/helpers.py”, line 656, in exit raise asyncio.TimeoutError from None