Rasa X start issue (asyncio / uvloop problem)

When I start my chatbot with rasa shell, it looks fine. When I start with rasa x, I receive the following errors:

2021-06-04 11:07:04 ERROR asyncio - Task was destroyed but it is pending! task: <Task pending name=‘Task-8’ coro=<TCPConnector._resolve_host() running at /home/kormoczi/.local/lib/python3.8/site-packages/aiohttp/connector.py:865> wait_for=<Future finished exception=gaierror(-3, ‘Temporary failure in name resolution’)> cb=[TCPConnector._create_direct_connection..drop_exception() at /home/kormoczi/.local/lib/python3.8/site-packages/aiohttp/connector.py:1002]> 2021-06-04 11:07:04 ERROR asyncio - Unhandled exception in event loop Traceback (most recent call last): File “uvloop/dns.pyx”, line 389, in uvloop.loop.__on_addrinfo_resolved File “uvloop/loop.pyx”, line 894, in uvloop.loop.Loop._getaddrinfo.callback File “uvloop/loop.pyx”, line 1257, in uvloop.loop.Loop.call_soon File “uvloop/loop.pyx”, line 635, in uvloop.loop.Loop._call_soon File “uvloop/loop.pyx”, line 639, in uvloop.loop.Loop._call_soon_handle File “uvloop/loop.pyx”, line 668, in uvloop.loop.Loop._check_closed RuntimeError: Event loop is closed [2021-06-04 11:07:08 +0200] [29039] [INFO] Goin’ Fast @ 2021-06-04 11:07:08 INFO sanic.root - Goin’ Fast @

After this, the bot work (looks like everything is ok), but I would like to understand this problem, and correct it.

Do you have any suggestion or advice?

Thank you and best regards, Csaba

Hi @kormoczi this looks like a problem with the asyncio loop exiting. Are there any other processes running on your machine that might be using the asyncio loop?

Hi @b-quachtran I am using a fresh Ubuntu install in a VirtualBox VM, only some development tools have been installed (git, meld, mc, Visual Studio Code). And the issue is there even if I start Rasa X immediately after system startup, without running any other apps (I only start a terminal window to launch Rasa X). So I think there is no other processes running that might be using the asyncio loop…

Hmm @kormoczi, which version of Rasa X do you have installed? This could potentially be a bug.

Hi @b-quachtran, I have checked my Rasa X install, and the version is 0.39.3 (Rasa==2.6.2, Rasa SDK==2.6.0). I though, it is a latest version, but as I could check right now, Rasa X at version 0.40.x. (By the way, I have installed it in local mode, approx 3 weeks ago.) I have tried upgrade, and both Rasa and Rasa SDK went up for 2.7.0, but a simple upgrade (python3 -m pip install --upgrade rasa-x) did not change Rasa X version.

But it looks like, that this Rasa/Rasa SDK upgrade solved my problem, the error messages has disappeared. (Also strange, I was almost sure, that the problem is with Rasa X and not with Rasa…)

Sorry not thinking about this earlier, thank you for reminding me for checking the versions!