Code Monkey home page Code Monkey logo

Comments (13)

Issen007 avatar Issen007 commented on May 16, 2024 1

@vkosuri you shouldn't delete the entire sqlite file to untrain the chatterbot.
Especially not when you are using it with Django. In that case you can only mark the wrong data and delete that row (Statement/Responds) or you can modify that statement / responds to the correct answer.

from chatterbot-corpus.

vkosuri avatar vkosuri commented on May 16, 2024

Currently there is no feature avaliable. However you could delete db.sqlite file from your directory

from chatterbot-corpus.

ayushecps avatar ayushecps commented on May 16, 2024

i have deleted the db.sqlite file but now it is throwing error.

error

from chatterbot-corpus.

vkosuri avatar vkosuri commented on May 16, 2024

Every deletion you have to reteain the bot

python manage.py train

from chatterbot-corpus.

MayankGupta3090 avatar MayankGupta3090 commented on May 16, 2024

could you please explain the steps how should i retain the bot .. i mean how can i deletethe sqlite file and train the bot ..please help. i m beginner

from chatterbot-corpus.

MayankGupta3090 avatar MayankGupta3090 commented on May 16, 2024

I did following:

  1. deleted the db.sqlite file
  2. then train the bot
    during the training it errorout with the error as my friend ayush commented before. please help us in fixing the issue

the error that we are getting is this:

C:\Python36\python.exe C:/Users/mayan/Desktop/Circus-master/manage.py train
botprofile.yml Training: [### ] 17%Traceback (most recent call last):
File "C:\Python36\lib\site-packages\django\db\backends\utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "C:\Python36\lib\site-packages\django\db\backends\sqlite3\base.py", line 328, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: no such table: django_chatterbot_statement

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:/Users/mayan/Desktop/Circus-master/manage.py", line 10, in
execute_from_command_line(sys.argv)
File "C:\Python36\lib\site-packages\django\core\management_init_.py", line 363, in execute_from_command_line
utility.execute()
File "C:\Python36\lib\site-packages\django\core\management_init_.py", line 355, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Python36\lib\site-packages\django\core\management\base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "C:\Python36\lib\site-packages\django\core\management\base.py", line 330, in execute
output = self.handle(*args, **options)
File "C:\Python36\lib\site-packages\chatterbot\ext\django_chatterbot\management\commands\train.py", line 19, in handle
chatterbot.train(chatterbot.training_data)
File "C:\Python36\lib\site-packages\chatterbot\trainers.py", line 133, in train
statement = self.get_or_create(text)
File "C:\Python36\lib\site-packages\chatterbot\trainers.py", line 28, in get_or_create
statement = self.storage.find(statement_text)
File "C:\Python36\lib\site-packages\chatterbot\storage\django_storage.py", line 25, in find
return Statement.objects.get(text=statement_text)
File "C:\Python36\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "C:\Python36\lib\site-packages\django\db\models\query.py", line 374, in get
num = len(clone)
File "C:\Python36\lib\site-packages\django\db\models\query.py", line 232, in len
self._fetch_all()
File "C:\Python36\lib\site-packages\django\db\models\query.py", line 1118, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "C:\Python36\lib\site-packages\django\db\models\query.py", line 53, in iter
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
File "C:\Python36\lib\site-packages\django\db\models\sql\compiler.py", line 894, in execute_sql
raise original_exception
File "C:\Python36\lib\site-packages\django\db\models\sql\compiler.py", line 884, in execute_sql
cursor.execute(sql, params)
File "C:\Python36\lib\site-packages\django\db\backends\utils.py", line 80, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "C:\Python36\lib\site-packages\django\db\backends\utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "C:\Python36\lib\site-packages\django\db\utils.py", line 94, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "C:\Python36\lib\site-packages\django\utils\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "C:\Python36\lib\site-packages\django\db\backends\utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "C:\Python36\lib\site-packages\django\db\backends\sqlite3\base.py", line 328, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such table: django_chatterbot_statement

Process finished with exit code 1

from chatterbot-corpus.

vkosuri avatar vkosuri commented on May 16, 2024

I these steps will solve your problem

python manage.py makemigrations
python manage.py train
python manage.py runserver

from chatterbot-corpus.

ayushecps avatar ayushecps commented on May 16, 2024

All command I am running in the directory where the manage file is stored right ?

When I run
python manage.py makemigrations
It says no changes detected

While after running above command I run python manage.py train it again gave me same error

from chatterbot-corpus.

vkosuri avatar vkosuri commented on May 16, 2024

can you try like this

python manage.py syncdb
python manage.py migrate
python manage.py makemigrations 

If not try these instructions gunthercox/ChatterBot#923 (comment)

from chatterbot-corpus.

ayushecps avatar ayushecps commented on May 16, 2024

from chatterbot-corpus.

Issen007 avatar Issen007 commented on May 16, 2024

@ayushecps If this is solve, can you please close this ticket.
If you get the wrong responds to a statement. Please open a new ticket so it will be easier for us to keep track what's is a bug or not.

from chatterbot-corpus.

vkosuri avatar vkosuri commented on May 16, 2024

@Issen007 said is correct.

from chatterbot-corpus.

Issen007 avatar Issen007 commented on May 16, 2024

Haven't got any answer on this. Will close this ticket.

from chatterbot-corpus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.