Cannot init Rasa Open source after installation due to ImportError

Hi, I followed the installation guide and pip3 installed rasa on my mac. However, when I ran “rasa init”, this erro keeps popping up. python = 3.8.5 Can you please help?

I just commented this line in utils.py, and it seems working.

1 Like

I had the same error and managed to initialize rasa by commenting this line in utils.py. However, when I try to train the rasa bot, another error message appeared. The earlier error and this error are all related to importing sanic functions and I wonder why.

File “C:\ProgramData\Anaconda3\envs\installingrasa\lib\site-packages\rasa\core\channels\rasa_chat.py”, line 6, in from sanic.exceptions import abort ImportError: cannot import name ‘abort’ from ‘sanic.exceptions’ (C:\ProgramData\Anaconda3\envs\installingrasa\lib\site-packages\sanic\exceptions.py)

A similar error pops out when training the initial model. "ImportError: cannot import name ‘abort’ from ‘sanic.exceptions’ ". It seems sanic package has not been updated in rasa while many sanic functions are deprecated.

Can anyone please advise? Shall I install rasa 2.x instead?

I had a similar error but @nik202’s advice to downgrade sanic to sanic==21.9.3 worked for me.

4 Likes

just tried and it worked, thank you!

@Edictory nice :+1: you helped in a right way to nightjean :relaxed:. Thanks

This helped me.Thanx so much