rasa: uvloop is stuck on rasa init
Rasa version:
➜ fastfood-bot git:(master) pip freeze | grep rasa
rasa==1.6.1
rasa-sdk==1.6.1
rasa-x==0.24.2
Python version:
fastfood-bot git:(master) python --version
Python 3.6.6
Operating system (windows, osx, …):
mac
Issue:
When I run rasa init
I get a huge dump of this in the terminal;
Unhandled exception in event loop:
File "uvloop/cbhandles.pyx", line 68, in uvloop.loop.Handle._run
File "/Users/vincent/Development/fastfood-bot/venv/lib/python3.6/site-packages/prompt_toolkit/eventloop/utils.py", line 69, in schedule
if not loop2._ready: # type: ignore
Exception 'Loop' object has no attribute '_ready'
Error (including full traceback):
Eventually when I ctrl-c out I get this;
Unhandled exception in event loop:
File "uvloop/loop.pyx", line 436, in uvloop.loop.Loop._on_idle
File "uvloop/cbhandles.pyx", line 90, in uvloop.loop.Handle._run
File "uvloop/cbhandles.pyx", line 70, in uvloop.loop.Handle._run
File "/Users/vincent/Development/fastfood-bot/venv/lib/python3.6/site-packages/prompt_toolkit/application/application.py", line 810, in in_term
await _do_wait_for_enter("Press ENTER to continue...")
File "/Users/vincent/Development/fastfood-bot/venv/lib/python3.6/site-packages/prompt_toolkit/application/application.py", line 1147, in _do_wait_for_enter
await session.app.run_async()
File "/Users/vincent/Development/fastfood-bot/venv/lib/python3.6/site-packages/prompt_toolkit/application/application.py", line 772, in run_async
return await _run_async2()
File "/Users/vincent/Development/fastfood-bot/venv/lib/python3.6/site-packages/prompt_toolkit/application/application.py", line 754, in _run_async2
result = await _run_async()
File "/Users/vincent/Development/fastfood-bot/venv/lib/python3.6/site-packages/prompt_toolkit/application/application.py", line 690, in _run_async
result = await f
Press ENTER to continue...
Cancelled by user
Ok. You can continue setting up by running 'rasa init' 🙋🏽♀️
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (8 by maintainers)
I figured out the issue for
rasa shell
andrasa init
. The problem is that some of the packages that Rasa depends on got updated. You want to make sure that your packages are the versions below to make this work:google-auth==1.10.1
prompt-toolkit==2.0.10
questionary==1.4.0
SQLAlchemy==1.3.12
urllib3==1.25.7
Hope this helps!
@tettoffensive You can do a few things to make sure of this:
Look into
virtualenv
to create virtual environments for this project. This will sandbox your project so that it does not affect the global dependencies that some of your other projects may run on.After you install Rasa and all of its dependencies have also been installed, before running
rasa init
to initialize the project, make sure you reinstall these packages with these version numbers:You can do so by doing `pip install --force-reinstall <INSERT package_name==version_number>
Hopefully this helps you to get back on track!
Fixed in Rasa 1.6.2 🎉 Thanks for bringing this up! One of our dependencies broke, so it wasn’t a bug in rasa itself but somewhere in the upstream dependencies.
I fixed this following @codeabiswas’s suggestion, although I only had to bump down the version for prompt-toolkit and questionary. Seems like the issue arises from one of those two packages.
There should probably be a
requirements.txt
-based setup. That would be tried and tested with the version numbers for packages so that there is less build breaking.