ERROR rasa_core.training.online - An exception occurred while recording messages

Does anyone know how to fix this error? I can’t even get started with the interactive training as rasa_core barfs with AssertionError :

2018-11-22 16:13:02 INFO rasa_core.training.online - Rasa Core server is up and running on http://localhost:5005 Bot loaded. Type a message and press enter (use ‘/stop’ to exit). 127.0.0.1 - - [2018-11-22 16:13:02] “GET /domain HTTP/1.1” 200 14606 0.003008 127.0.0.1 - - [2018-11-22 16:13:02] “GET /conversations/default/tracker?include_events=APPLIED HTTP/1.1” 200 441 0.001654 2018-11-22 16:13:02 ERROR rasa_core.training.online - An exception occurred while recording messages. Traceback (most recent call last): File “/home/soonyee/kkhchatbot/lib/python3.6/site-packages/rasa_core/training/online.py”, line 857, in record_messages _enter_user_message(sender_id, endpoint, exit_text) File “/home/soonyee/kkhchatbot/lib/python3.6/site-packages/rasa_core/training/online.py”, line 788, in _enter_user_message is_abort=lambda a: a[“message”] == exit_text) File “/home/soonyee/kkhchatbot/lib/python3.6/site-packages/rasa_core/training/online.py”, line 233, in _ask_questions answers = prompt(questions) File “/home/soonyee/kkhchatbot/lib/python3.6/site-packages/PyInquirer/prompt.py”, line 71, in prompt eventloop=eventloop) File “/home/soonyee/kkhchatbot/lib/python3.6/site-packages/prompt_toolkit/shortcuts.py”, line 576, in run_application output=create_output(true_color=true_color)) File “/home/soonyee/kkhchatbot/lib/python3.6/site-packages/prompt_toolkit/interface.py”, line 81, in init self.input = input or StdinInput(sys.stdin) File “/home/soonyee/kkhchatbot/lib/python3.6/site-packages/prompt_toolkit/input.py”, line 67, in init assert self.stdin.isatty() AssertionError Exception in thread Thread-9: Traceback (most recent call last): File “/usr/lib/python3.6/threading.py”, line 916, in _bootstrap_inner self.run() File “/usr/lib/python3.6/threading.py”, line 864, in run self._target(*self._args, **self._kwargs) File “/home/soonyee/kkhchatbot/lib/python3.6/site-packages/rasa_core/training/online.py”, line 857, in record_messages _enter_user_message(sender_id, endpoint, exit_text) File “/home/soonyee/kkhchatbot/lib/python3.6/site-packages/rasa_core/training/online.py”, line 788, in _enter_user_message is_abort=lambda a: a[“message”] == exit_text) File “/home/soonyee/kkhchatbot/lib/python3.6/site-packages/rasa_core/training/online.py”, line 233, in _ask_questions answers = prompt(questions) File “/home/soonyee/kkhchatbot/lib/python3.6/site-packages/PyInquirer/prompt.py”, line 71, in prompt eventloop=eventloop) File “/home/soonyee/kkhchatbot/lib/python3.6/site-packages/prompt_toolkit/shortcuts.py”, line 576, in run_application output=create_output(true_color=true_color)) File “/home/soonyee/kkhchatbot/lib/python3.6/site-packages/prompt_toolkit/interface.py”, line 81, in init self.input = input or StdinInput(sys.stdin) File “/home/soonyee/kkhchatbot/lib/python3.6/site-packages/prompt_toolkit/input.py”, line 67, in init assert self.stdin.isatty() AssertionError

command used:

python -m rasa_core.train
–online -o models/current/dialogue
-d domain.yml -s data/stories.md
–nlu models/current/nlu
–endpoints endpoints.yml
–epochs 200

Python version : 3.6.7 DISTRIB_DESCRIPTION=“Ubuntu 18.04.1 LTS” rasa_core version : 0.11.12 rasa_nlu version : 0.13.7

Hey @idmtsyc. With Rasa Core 0.11.12 you should run the following:

python -m rasa_core.train --online -o models/current/dialogue -d domain.yml -s data/stories.md -u models/current/nlu --endpoints endpoints.yml --epochs 200

Give it a try and let us know if the error persists.

Hi @Juste

I tried as you suggested: python -m rasa_core.train
–online -o models/current/dialogue
-d domain.yml -s data/stories.md
-u models/current/nlu
–endpoints endpoints.yml
–epochs 200

Still encounter the same error. What am i missing?

I fixed the problem :slightly_smiling_face:

reran this on the project directory:

python3 -m venv /home/soonyee/kkhchatbot/

and your command worked.

Thanks @Juste

1 Like

@Juste

even i’m facing the same issue i tried on project directory still it has error

python -m rasa_core.train --online -o models/dialogue -d domain.yml -s data/stories.md -u models/nlu/default/doctornlu --endpoints endpoints.yml --epochs 200

and this is my error error: unrecognized arguments: --online -u /models/nlu/default/doctornlu --endpoints endpoints.yml --epochs 200