ChatterBot icon indicating copy to clipboard operation
ChatterBot copied to clipboard

something wrong happened in comparisons.py

Open x8888k opened this issue 9 years ago • 3 comments

call function synset_distance but process is finished.

Traceback (most recent call last): File "/tmp/pycharm_project_training/ChatterBotQuikStart.py", line 20, in response = chatbot.get_response("hi") File "/usr/local/lib/python3.5/site-packages/chatterbot/chatterbot.py", line 98, in get_response statement, response, confidence = self.generate_response(input_statement, session_id) File "/usr/local/lib/python3.5/site-packages/chatterbot/chatterbot.py", line 122, in generate_response confidence, response = self.logic.process(input_statement) File "/usr/local/lib/python3.5/site-packages/chatterbot/logic/multi_adapter.py", line 37, in process confidence, output = adapter.process(statement) File "/usr/local/lib/python3.5/site-packages/chatterbot/logic/best_match.py", line 71, in process response = self.select_response(input_statement, response_list) File "/usr/local/lib/python3.5/site-packages/chatterbot/comparisons.py", line 76, in synset_distance tokens2 = word_tokenize(other_statement.text.lower()) #AttributeError: 'list' object has no attribute 'text'

Process finished with exit code 1

is other_statement a list?but get_first_response return response_list[0].

x8888k avatar Jan 22 '17 11:01 x8888k

@x8888k which version of chatterbot are you using Try this command on console python -m chatterbot --version to get version. If possible can you share code snippet to reproduce your issue?

vkosuri avatar Jan 23 '17 05:01 vkosuri

@vkosuri thanks for your reply I'm sorry that I have set a incorrect param---response_selection_method="chatterbot.comparisons.synset_distance" it should be statement_comparison_function="chatterbot.comparisons.synset_distance"

sorry,plz close this issue.

x8888k avatar Jan 23 '17 07:01 x8888k

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Mar 10 '19 07:03 lock[bot]