petasis
(George)
September 16, 2020, 2:07pm
1
Hi all,
I have a form, which calls an external service. This service may take a while (i.e. ~8-10 seconds).
As a result, most of the time I get a timeout in “rasa shell”, and then no response.
Is there a way to change the timeout used by rasa to the endpoint servicing the form?
petasis
(George)
September 16, 2020, 2:14pm
2
The error I get on the “rasa shell” is:
asyncio - Task exception was never retrieved
Google finds a relevant (but closed) issue:
opened 07:19AM - 17 Jun 20 UTC
closed 05:58AM - 28 Jun 20 UTC
type:bug
area:rasa-oss
<!-- THIS INFORMATION IS MANDATORY - YOUR ISSUE WILL BE CLOSED IF IT IS MISSING.… If you don't know your Rasa version, use `rasa --version`.
Please format any code or console output with three ticks ``` above and below.
If you are asking a usage question (e.g. "How do I do xyz") please post your question on https://forum.rasa.com instead -->
**Rasa version**:
Rasa 1.10.0
**Rasa SDK version** (if used & relevant):
**Rasa X version** (if used & relevant):
**Python version**:
Python 3.6.10 :: Anaconda, Inc.
**Operating system** (windows, osx, ...):
Ubuntu 16.04
**Issue**:
asyncio - Task exception was never retrieved
future: <Task finished coro=<configure_app.<locals>.run_cmdline_io() done, defined at /home/xxx/anaconda3/envs/chatter/lib/python3.6/site-packages/rasa/core/run.py:128> exception=RuntimeError('this event loop is already running.',)>
**Error (including full traceback)**:
```
Traceback (most recent call last):
File "/home/xxx/anaconda3/envs/chatter/lib/python3.6/site-packages/rasa/core/run.py", line 134, in run_cmdline_io
sender_id=conversation_id,
File "/home/xxx/anaconda3/envs/chatter/lib/python3.6/site-packages/rasa/core/channels/console.py", line 142, in record_messages
text = get_user_input(button_question)
File "/home/xxx/anaconda3/envs/chatter/lib/python3.6/site-packages/rasa/core/channels/console.py", line 78, in get_user_input
style=Style([("qmark", "#b373d6"), ("", "#b373d6")]),
File "/home/xxx/anaconda3/envs/chatter/lib/python3.6/site-packages/questionary/question.py", line 45, in ask
return self.unsafe_ask(patch_stdout)
File "/home/xxx/anaconda3/envs/chatter/lib/python3.6/site-packages/questionary/question.py", line 59, in unsafe_ask
return self.application.run()
File "/home/xxx/anaconda3/envs/chatter/lib/python3.6/site-packages/prompt_toolkit/application/application.py", line 812, in run
self.run_async(pre_run=pre_run, set_exception_handler=set_exception_handler)
File "uvloop/loop.pyx", line 1450, in uvloop.loop.Loop.run_until_complete
File "uvloop/loop.pyx", line 1443, in uvloop.loop.Loop.run_until_complete
File "uvloop/loop.pyx", line 1351, in uvloop.loop.Loop.run_forever
File "uvloop/loop.pyx", line 480, in uvloop.loop.Loop._run
RuntimeError: this event loop is already running.
```
**Command or request that led to error**:
```
rasa run actions & rasa shell
```
**Content of configuration file (config.yml)** (if relevant):
```yml
```
**Content of domain file (domain.yml)** (if relevant):
```yml
```
Last time the issue was resolved by reinstalling Rasa, however, it happened again.
**update**
I find the same issue in the Rasa community ("https://forum.rasa.com/t/error-this-event-loop-is-already-running/24017"), the questionary package was downgraded to 1.4.0 as suggested and the error prompt is disappeared. It really works and to some extend the issue is resolved.
amn41
(Alan Nichol)
September 17, 2020, 6:07am
3
hi @petasis ! this is set as a constant here rasa/constants.py at 1.10.x · RasaHQ/rasa · GitHub
so you can override it if you want to.
petasis
(George)
September 17, 2020, 8:10am
4
Hi, thank you very much for your reply!
The problem is that this timeout is not respected. I get a timeout ~15 seconds. And the timeout is 5 minutes.
So, changing (increasing it), has no effect.
The problem (thankfully) happens only with rasa shell. With rasa run, it works as expected.
But my rasa shell is now unusable.
Akhil
(Akhil)
October 13, 2020, 8:55am
5
Hi @petasis . Did u solve this issue in rasa shell?
petasis
(George)
October 13, 2020, 9:57am
6
I don’t know yet. I am waiting for a fix to rasa 2.0 to make my forms work again. Right now my test suit does not run.