Closed sherinmannambeth closed 5 years ago
This looks like you are trying to load a rasa NLU from an older version with a newer version. Retraining the NLU model should fix this issue.
@tmbo This error comes when I give the rasa_core.run command This error gets solved when I remove the 'prefix5' from metadata.json file in trained nlu model(which I dont think is the solution)
yes, it's an NLU issue though. Have you tried retraining?
@akelad Yes, but still the same issue persists.
very interesting. I came accross with the same issue.
@sherinmannambeth @xentnex have you managed to solve this issue in the meantime?
I am still facing the issue.
Bot loaded. Type a message and press enter: Hello
Traceback (most recent call last):
File "train_online.py", line 50, in <module>
run_weather_online(nlu_interpreter)
File "train_online.py", line 42, in run_weather_online
max_training_samples=300)
File "C:\Users\sumit\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\agent.py", line 300, in train_online
input_channel)
File "C:\Users\sumit\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\policies\online_trainer.py", line 76, in run_online_training
input_channel if input_channel else ConsoleInputChannel())
File "C:\Users\sumit\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\agent.py", line 160, in handle_channel
processor.handle_channel(input_channel)
File "C:\Users\sumit\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\processor.py", line 61, in handle_channel
input_channel.start_sync_listening(self.handle_message)
File "C:\Users\sumit\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\channels\console.py", line 52, in start_sync_listening
self._record_messages(message_handler)
File "C:\Users\sumit\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\channels\console.py", line 45, in _record_messages
self.sender_id))
File "C:\Users\sumit\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\processor.py", line 83, in handle_message
self._handle_message_with_tracker(message, tracker)
File "C:\Users\sumit\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\processor.py", line 223, in _handle_message_with_tracker
parse_data = self._parse_message(message)
File "C:\Users\sumit\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\processor.py", line 212, in _parse_message
parse_data = self.interpreter.parse(message.text)
File "C:\Users\sumit\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\interpreter.py", line 232, in parse
return self.interpreter.parse(text)
File "C:\Users\sumit\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_nlu\model.py", line 340, in parse
component.process(message, **self.context)
File "C:\Users\sumit\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_nlu\extractors\crf_entity_extractor.py", line 126, in process
extracted = self.add_extractor_name(self.extract_entities(message))
File "C:\Users\sumit\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_nlu\extractors\crf_entity_extractor.py", line 145, in extract_entities
features = self._sentence_to_features(text_data)
File "C:\Users\sumit\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_nlu\extractors\crf_entity_extractor.py", line 361, in _sentence_to_features
value = self.function_dict[feature](word)
KeyError: 'prefix5'
Please help with this
@ranjan-sumit can you please share the contents of your models persisted metadata.json
?
I am also getting the same error
Traceback (most recent call last): File "/home/himnashu/anaconda3/envs/RASA_NEW/bin/rasa", line 8, in <module> sys.exit(main()) File "/home/himnashu/anaconda3/envs/RASA_NEW/lib/python3.6/site-packages/rasa/__main__.py", line 76, in main cmdline_arguments.func(cmdline_arguments) File "/home/himnashu/anaconda3/envs/RASA_NEW/lib/python3.6/site-packages/rasa/cli/train.py", line 76, in train kwargs=extract_additional_arguments(args), File "/home/himnashu/anaconda3/envs/RASA_NEW/lib/python3.6/site-packages/rasa/train.py", line 45, in train kwargs=kwargs, File "uvloop/loop.pyx", line 1417, in uvloop.loop.Loop.run_until_complete File "/home/himnashu/anaconda3/envs/RASA_NEW/lib/python3.6/site-packages/rasa/train.py", line 96, in train_async kwargs, File "/home/himnashu/anaconda3/envs/RASA_NEW/lib/python3.6/site-packages/rasa/train.py", line 182, in _train_async_internal kwargs=kwargs, File "/home/himnashu/anaconda3/envs/RASA_NEW/lib/python3.6/site-packages/rasa/train.py", line 231, in _do_training persist_nlu_training_data=persist_nlu_training_data, File "/home/himnashu/anaconda3/envs/RASA_NEW/lib/python3.6/site-packages/rasa/train.py", line 459, in _train_nlu_with_validated_data persist_nlu_training_data=persist_nlu_training_data, File "/home/himnashu/anaconda3/envs/RASA_NEW/lib/python3.6/site-packages/rasa/nlu/train.py", line 80, in train interpreter = trainer.train(training_data, **kwargs) File "/home/himnashu/anaconda3/envs/RASA_NEW/lib/python3.6/site-packages/rasa/nlu/model.py", line 195, in train updates = component.train(working_data, self.config, **context) File "/home/himnashu/anaconda3/envs/RASA_NEW/lib/python3.6/site-packages/rasa/nlu/extractors/crf_entity_extractor.py", line 156, in train self._train_model(dataset) File "/home/himnashu/anaconda3/envs/RASA_NEW/lib/python3.6/site-packages/rasa/nlu/extractors/crf_entity_extractor.py", line 663, in _train_model X_train = [self._sentence_to_features(sent) for sent in df_train] File "/home/himnashu/anaconda3/envs/RASA_NEW/lib/python3.6/site-packages/rasa/nlu/extractors/crf_entity_extractor.py", line 663, in <listcomp> X_train = [self._sentence_to_features(sent) for sent in df_train] File "/home/himnashu/anaconda3/envs/RASA_NEW/lib/python3.6/site-packages/rasa/nlu/extractors/crf_entity_extractor.py", line 481, in _sentence_to_features value = self.function_dict[feature](word) KeyError: 'word3'