Chatterbot: sqlalchemy.exc.IntegrityError

Created on 9 Jul 2017  路  4Comments  路  Source: gunthercox/ChatterBot

Hi, i train the bot with the same response for different input :

chatbot.train(["Hello Good Morning", "Hi"])
chatbot.train(["Hello Goog Night", "Hi"])

and I get :

sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) UNIQUE constraint failed: ResponseTable.text, ResponseTable.text_search [SQL: 'INSERT INTO "ResponseTable" (id, text, occurrence, statement_text, text_search) VALUES (?, ?, ?, ?, ?)'] [parameters: (None, 'Hello Good Morning', 1, 'Hi', '{"id": null, "text": "Hello Good Morning", "occurrence": 1, "statement_text": "Hi"}')]

bug

Most helpful comment

Hey, this is definitely a bug. Its in this file: https://github.com/gunthercox/ChatterBot/blob/master/chatterbot/storage/sql_storage.py
It may be a day or so before I get a chance to check through the code and fix it.
Sorry.

All 4 comments

yes, i'm reproducing it... could anybody help with this? thanks.

Hey, this is definitely a bug. Its in this file: https://github.com/gunthercox/ChatterBot/blob/master/chatterbot/storage/sql_storage.py
It may be a day or so before I get a chance to check through the code and fix it.
Sorry.

@gunthercox, what is the status of this bug? I ran into this a few days ago, and it seems that it doesn't connect to the database when one uses the SQLStorageAdapter. Is this what you found? In this case, I suppose we can just hard code the path to our SQL dbs while we wait for the fix, right?

@sal48 The status is the same as it was a few days ago. You will see comments and / or pull requests from me when I make changes.

it seems that it doesn't connect to the database when one uses the SQLStorageAdapter

This issue is due to integrity errors from a unique constraint violation.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

decode007 picture decode007  路  3Comments

AfrahAsif picture AfrahAsif  路  3Comments

hochochoc picture hochochoc  路  3Comments

cesarandreslopez picture cesarandreslopez  路  4Comments

Jackojc picture Jackojc  路  4Comments