-1

I am building a chatbot with rasa; I can interact with it in a Ubuntu bash but I do not manage ot interact with it in a anaconda prompt : I do manage to load the bot using bot.py run but when I type the first message I get the following error message:

Bot loaded. Type a message and press enter:
'Hello'
XXX lineno: 105, opcode: 0
Traceback (most recent call last):
  File "bot.py", line 90, in <module>
    run()
  File "bot.py", line 68, in run
    agent.handle_channel(ConsoleInputChannel())
  File "C:\Users\Vincent\Documents\Chatbot_Eleven_Candidats\Versions\rasa_test4\rasa_core\agent.py", line 123, in handle_channel
    processor.handle_channel(input_channel)
  File "C:\Users\Vincent\Documents\Chatbot_Eleven_Candidats\Versions\rasa_test4\rasa_core\processor.py", line 60, in handle_channel
    input_channel.start_sync_listening(self.handle_message)
  File "C:\Users\Vincent\Documents\Chatbot_Eleven_Candidats\Versions\rasa_test4\rasa_core\channels\console.py", line 52, in start_sync_listening
    self._record_messages(message_handler)
  File "C:\Users\Vincent\Documents\Chatbot_Eleven_Candidats\Versions\rasa_test4\rasa_core\channels\console.py", line 45, in _record_messages
    self.sender_id))
  File "C:\Users\Vincent\Documents\Chatbot_Eleven_Candidats\Versions\rasa_test4\rasa_core\processor.py", line 81, in handle_message
    self._handle_message_with_tracker(message, tracker)
  File "C:\Users\Vincent\Documents\Chatbot_Eleven_Candidats\Versions\rasa_test4\rasa_core\processor.py", line 221, in _handle_message_with_tracker
    parse_data = self._parse_message(message)
  File "C:\Users\Vincent\Documents\Chatbot_Eleven_Candidats\Versions\rasa_test4\rasa_core\processor.py", line 210, in _parse_message
    parse_data = self.interpreter.parse(message.text)
  File "C:\Users\Vincent\Documents\Chatbot_Eleven_Candidats\Versions\rasa_test4\rasa_core\interpreter.py", line 236, in parse
    return self.interpreter.parse(text)
  File "C:\Users\Vincent\Documents\Chatbot_Eleven_Candidats\Versions\rasa_test4\rasa_nlu\model.py", line 344, in parse
    component.process(message, **self.context)
  File "C:\Users\Vincent\Documents\Chatbot_Eleven_Candidats\Versions\rasa_test4\rasa_nlu\featurizers\count_vectors_featurizer.py", line 149, in process
    bag = self.vect.transform([self._lemmatize(message)]).toarray()
  File "C:\Users\Vincent\Anaconda3\lib\site-packages\sklearn\feature_extraction\text.py", line 923, in transform
    _, X = self._count_vocab(raw_documents, fixed_vocab=True)
  File "C:\Users\Vincent\Anaconda3\lib\site-packages\sklearn\feature_extraction\text.py", line 792, in _count_vocab
    for feature in analyze(doc):
  File "C:\Users\Vincent\Anaconda3\lib\site-packages\sklearn\feature_extraction\text.py", line 266, in <lambda>
    tokenize(preprocess(self.decode(doc))), stop_words)
  File "/usr/local/lib/python3.5/dist-packages/rasa_nlu/featurizers/count_vectors_featurizer.py", line 105, in <lambda>
SystemError: unknown opcode
Vincent
  • 482
  • 6
  • 22
  • Please don't post code/terminal output in images. See here for why: https://meta.stackoverflow.com/a/285557/2449192 – darthbith Dec 31 '18 at 01:43
  • Does it work if you run it using python -m rasa_core.run -d models/dialogue (replacing the path with the path to your dialogue model)? – Ray A. Jan 01 '19 at 00:39

1 Answers1

0

ConsoleInputChannel() is removed starting from Rasa V 0.12.

You can still use command prompt for testing purpose using

python -m rasa_core.run -d path-to-dialogue -u path-to-nlu model

Karthik Sunil
  • 544
  • 5
  • 15