Internal Server Error while running interactive learning

I was trying to do interactive learning through Python Script in rasa_core. Currently I have version 0.12.3 of rasa_core.

The interactive learning starts fine, but after I enter a message and the intent is correctly identified, but after pressing Enter, it shows the following error:

? Is the NLU classification for ‘hey’ with intent ‘greet’ correct? Yes 2018-12-18 20:38:44 ERROR rasa_core.server - Caught an exception during prediction. Traceback (most recent call last): File “/usr/local/lib/python3.5/dist-packages/rasa_core/server.py”, line 410, in predict responses = agent.predict_next(sender_id) File “/usr/local/lib/python3.5/dist-packages/rasa_core/agent.py”, line 329, in predict_next return processor.predict_next(sender_id) File “/usr/local/lib/python3.5/dist-packages/rasa_core/processor.py”, line 107, in predict_next self._get_next_action_probabilities(tracker) File “/usr/local/lib/python3.5/dist-packages/rasa_core/processor.py”, line 478, in _get_next_action_probabilities tracker, self.domain) File “/usr/local/lib/python3.5/dist-packages/rasa_core/policies/ensemble.py”, line 291, in probabilities_using_best_policy if (result.index(max_confidence) == AttributeError: ‘NoneType’ object has no attribute ‘index’ 2018-12-18 20:38:44 ERROR rasa_core.training.interactive - An exception occurred while recording messages. Traceback (most recent call last): File “/usr/local/lib/python3.5/dist-packages/rasa_core/training/interactive.py”, line 1286, in record_messages finetune, sender_ids, plot_file) File “/usr/local/lib/python3.5/dist-packages/rasa_core/training/interactive.py”, line 853, in _predict_till_next_listen response = request_prediction(endpoint, sender_id) File “/usr/local/lib/python3.5/dist-packages/rasa_core/training/interactive.py”, line 135, in request_prediction return _response_as_json® File “/usr/local/lib/python3.5/dist-packages/rasa_core/training/interactive.py”, line 98, in _response_as_json response.raise_for_status() File “/usr/local/lib/python3.5/dist-packages/requests/models.py”, line 940, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 500 Server Error: INTERNAL SERVER ERROR for url: http://localhost:5005/conversations/05c6cc83d799492ab82dad1031e062f4/predict Exception in thread Thread-5: Traceback (most recent call last): File “/usr/lib/python3.5/threading.py”, line 914, in _bootstrap_inner self.run() File “/usr/lib/python3.5/threading.py”, line 862, in run self._target(*self._args, **self._kwargs) File “/usr/local/lib/python3.5/dist-packages/rasa_core/training/interactive.py”, line 1286, in record_messages finetune, sender_ids, plot_file) File “/usr/local/lib/python3.5/dist-packages/rasa_core/training/interactive.py”, line 853, in _predict_till_next_listen response = request_prediction(endpoint, sender_id) File “/usr/local/lib/python3.5/dist-packages/rasa_core/training/interactive.py”, line 135, in request_prediction return _response_as_json® File “/usr/local/lib/python3.5/dist-packages/rasa_core/training/interactive.py”, line 98, in _response_as_json response.raise_for_status() File “/usr/local/lib/python3.5/dist-packages/requests/models.py”, line 940, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 500 Server Error: INTERNAL SERVER ERROR for url: http://localhost:5005/conversations/05c6cc83d799492ab82dad1031e062f4/predict

I have included my train_online.py code in the following link: https://pastebin.com/bD12P187

Hi Arun! check out my online.py file. I had same issue at one point. Resolved it by adding future absolute import and other files. Try creating a file by matching my file. leave policy if you want to use default values.online.py (1.3 KB)

1 Like

Thanks a lot Akshit. It works!!

1 Like

happy to help! #GoRasa xD

1 Like

Hi. I’m having same kind of problem(different error though).I’m using Rasa Core 0.12 and Rasa nlu 0.13 (the latest version)

Rasa Core giving this error - Exception: BinarySingleStateFeaturizer was not prepared before encoding.

Any idea how to solve it?

i got this error as i was not training the agent before running interative learning.

just have a look below :slight_smile: data = agent.load_data(training_data_file) agent.train(data) Itrain.run_interactive_learning(agent,stories=training_data_file,skip_visualization = True)