From 9a8dc2661ae37c5a337ba7e664b5340982b0699e Mon Sep 17 00:00:00 2001 From: Abhijeet Kaur Date: Fri, 10 Feb 2017 05:32:09 +0530 Subject: [PATCH] bug fix: Fix errors in "john" bot in contrib_bots. Fix outdated code in "john.py" to use "OutputAdapter" module in Chatterbot. Typecast Chatterbot response to string. --- contrib_bots/bots/john/john.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib_bots/bots/john/john.py b/contrib_bots/bots/john/john.py index 33fcaf1..3822a52 100644 --- a/contrib_bots/bots/john/john.py +++ b/contrib_bots/bots/john/john.py @@ -38,7 +38,7 @@ def create_chat_bot(no_learn): "response_selection_method": "chatterbot.response_selection.get_random_response", "statement_comparison_function": "chatterbot.comparisons.levenshtein_distance" }], - output_adapter="chatterbot.output.OutputFormatAdapter", + output_adapter="chatterbot.output.OutputAdapter", output_format='text', database=DATABASE_PATH, silence_performance_warning="True", @@ -124,7 +124,7 @@ class JohnHandler(object): type='stream', to='VirtualHelp', subject="John", - content=bota.get_response(original_content) + content=str(bota.get_response(original_content)) )) handler_class = JohnHandler