sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) Ошибка при интеграции chatterbot - PullRequest
0 голосов
/ 02 марта 2019

Я пытаюсь интегрировать болтун с помощью python.Мой код выглядит нормально, и он работает до какого-то времени, а затем выдает мне эту ошибку, когда я отвечаю на бот No value for search_text was available on the provided input, и я получаю sqlite3.OperationalError, как это

sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: statement.search_text [SQL: "SELECT count(*) AS count_1 \nFROM (SELECT statement.id AS statement_id, statement.text AS statement_text, statement.search_text AS statement_search_text, statement.conversation AS statement_conversation, statement.created_at AS statement_created_at, statement.in_response_to AS statement_in_response_to, statement.search_in_response_to AS statement_search_in_response_to, statement.persona AS statement_persona \nFROM statement \nWHERE (statement.persona NOT LIKE ? || '%') AND (statement.search_text LIKE '%' || ? || '%')) AS anon_1"] [parameters: ('bot:', 'hi')] (Background on this error at: http://sqlalche.me/e/e3q8)

Я трачу много времени на поиск этой ошибки, я использую python3 версию.И мой код выглядит так:

from chatterbot.trainers import ListTrainer
from chatterbot import ChatBot
import os
import glob

bot = ChatBot('Bot')

for _file in os.listdir('files'):
   data = open('files/' + _file, 'r').readlines()

   #bot.set_trainer(ListTrainer)

   #bot.train(data)


while True:
   message = input('You: ')
   if message.strip() != 'Bye':
      reply = bot.get_response(message)
      print('LIN: ',reply)
   if message.strip() == 'bye':
      print('LIN : Bye')
      break

Не могли бы вы помочь мне найти решение?

...