Closed ancalita closed 2 years ago
I'm unable to replicate this issue after following the steps provided in the same virtualenv:
make install
rasamake install
rasa-sdkrasa init
a new projectrasa shell
I'm wondering if this is still an issue and which version of python you were using @ancalita.@carlad So sorry, just saw your q on Python version, I was using python 3.8.6.
Related to the dependencies' diff: are you comparing 3.0.x
or 2.8.x
?
@ancalita
Related to the dependencies' diff: are you comparing 3.0.x or 2.8.x?
I'm doing both, ~though it seems the dependencies are similar...~
@carlad I'm seeing this issue again just now in a fresh venv with rasa and rasa-sdk installed via make install
π
questionary
is version 1.10
, and the project I'm using has a custom action defined and runs the actions server in a separate tab too.
When you have some time, could you please check with a similar project to see if rasa shell
crashes for you too?
(oss-0122) β required_slots_formvalidationaction rasa shell
2022-01-24 16:19:36 INFO root - Connecting to channel 'cmdline' which was specified by the '--connector' argument. Any other channels will be ignored. To connect to all given channels, omit the '--connector' argument.
2022-01-24 16:19:36 INFO root - Starting Rasa server on http://0.0.0.0:5005
2022-01-24 16:19:37 INFO rasa.core.processor - Loading model models/20220124-161441-humid-duplet.tar.gz...
2022-01-24 16:19:50 WARNING rasa.shared.utils.common - The UnexpecTED Intent Policy is currently experimental and might change or be removed in the future π¬ Please share your feedback on it in the forum (https://forum.rasa.com) to help us make this feature ready for production.
2022-01-24 16:19:56 INFO root - Rasa server is up and running.
Bot loaded. Type a message and press enter (use '/stop' to exit):
2022-01-24 16:19:57 ERROR asyncio - Task exception was never retrieved
future: <Task finished name='Task-6' coro=<SignalRouter._dispatch() done, defined at /Users/ancalita/rasa-projects/oss-0122/lib/python3.8/site-packages/sanic/signals.py:102> exception=RuntimeError('this event loop is already running.')>
Traceback (most recent call last):
File "/Users/ancalita/rasa-projects/oss-0122/lib/python3.8/site-packages/sanic/signals.py", line 133, in _dispatch
retval = await maybe_coroutine
File "/Users/ancalita/rasa-projects/oss-0122/lib/python3.8/site-packages/sanic/app.py", line 1374, in run_delayed_task
await prepped
File "/Users/ancalita/rasa-projects/rasa/rasa/core/run.py", line 134, in run_cmdline_io
await console.record_messages(
File "/Users/ancalita/rasa-projects/rasa/rasa/core/channels/console.py", line 175, in record_messages
text = _get_user_input(previous_response)
File "/Users/ancalita/rasa-projects/rasa/rasa/core/channels/console.py", line 108, in _get_user_input
response = questionary.text(
File "/Users/ancalita/rasa-projects/oss-0122/lib/python3.8/site-packages/questionary/question.py", line 70, in ask
return self.unsafe_ask(patch_stdout)
File "/Users/ancalita/rasa-projects/oss-0122/lib/python3.8/site-packages/questionary/question.py", line 92, in unsafe_ask
return self.application.run()
File "/Users/ancalita/rasa-projects/oss-0122/lib/python3.8/site-packages/prompt_toolkit/application/application.py", line 890, in run
return loop.run_until_complete(
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.
Could it be related to this issue: https://github.com/RasaHQ/rasa/issues/10632?
So, without make install
ing anything, I wasn't able to replicate this working inside rasa-x-demo
directory.
I was able to run rasa shell
with no issues on either a rasa
2.8.x
or 3.0.x
virtualenv.
Rasa Version : 2.8.15
Minimum Compatible Version: 2.8.9
Rasa SDK Version : 2.8.2
Rasa X Version : 1.0.1
Python Version : 3.7.12
With rasa
3.0.x
I'm also able to execute rasa shell
ok.
Rasa Version : 3.0.0
Minimum Compatible Version: 3.0.0
Rasa SDK Version : 3.0.3
Rasa X Version : 1.0.1
Python Version : 3.8.6
However
After I ran make install
in the rasa-sdk
directory (following Anca's flow).
And then running rasa shell
in rasa-x-demo
I saw similar issues on 2.8.x
and 3.0.x
At first I thought it was the questionary
library version. There were several posts online from last year stating a rollback to v1.4.x fixed the issue. But after trying different questionary
versions, settling finally on v1.8.1
, I noticed that any time I ran make install
in the rasa
directory last, then ran rasa shell
, it would launch fine. But anytime I ran make install
in the rasa-sdk
directory, then ran rasa shell
, it would produce this error.
I've since updated questionary
to v1.10.0
(i.e. using what is currently specified in the released projects) and the same behaviour happens.
So I'm thinking it's not about dependency conflicts, but about a loop process in the rasa-sdk
make install
task that doesn't end/close properly, but somehow gets reset when rasa
is make install
ed .
So it turns out the issue was with the version of prompt-toolkit
we were installing. Previously we had the version tied to '^2.0'
in the .toml
file, but I must have changed it to a range, which ended up installing the latest version (3.something).
Rolling back to '^2.0'
solves the problem.
The fix now released in rasa 3.0.6
https://github.com/RasaHQ/rasa/releases/tag/3.0.6
and rasa-sdk 3.0.4
Description of Problem:
Installing editable version of
rasa-sdk
after having installed editable version ofrasa
in the same venv causes the bot to crash when runningrasa shell
, full stack trace below:This forum thread seems to pin the cause of this issue to the version of
questionary
which I noticedrasa-sdk
downgrades from1.10
to1.8
when runningmake install
.Definition of Done:
questionary
version inrasa-sdk
is pinned to the higher version as in rasa-ossrasa shell
without issues when both projects are installed as editable in the same venv