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' ๐๐ฝโโ๏ธ
seems relevant to mention;
fastfood-bot git:(master) pip freeze | grep uvloop
uvloop==0.14.0
It also deserves mentioning that this works fine;
โ fastfood-bot git:(master) rasa init --no-prompt
I actually did the same thing to get around it. However, when I run rasa shell, I get the same error as the one you are describing above.
I figured out the issue for rasa shell and rasa 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.1prompt-toolkit==2.0.10questionary==1.4.0SQLAlchemy==1.3.12urllib3==1.25.7Hope this helps!
Mhm... it seems that a version update messes things up often. See a previous bug of mine. Is this something that can be prevented?
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.
@koaning and @codeabiswas thanks for noting these dependency issues.
I'm seeing the same issue. I'm new to the python ecosystem. How do I make sure those dependencies get the proper versions?
@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
Hopefully this helps you to get back on track!
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.
To be more specific in case you install Rasa Open Source using the Quick Installation Approach, you have to follow it by a step pointed out by @ngould, to downgrade prompt-toolkit:
$ pip3 install rasa
$ pip install --upgrade prompt-toolkit==2.0.10
Now you should be able to run rasa init
The uvloop doesn't have _ready. We can just remove or comment that in utils.py. rasa init will work fine even after removing.
#if not loop2._ready: # type: ignore
# func()
# return
just reproduced this in a clean env
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.
Danke Schon.
Most helpful comment
I figured out the issue for
rasa shellandrasa 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.1prompt-toolkit==2.0.10questionary==1.4.0SQLAlchemy==1.3.12urllib3==1.25.7Hope this helps!