ChatterBot icon indicating copy to clipboard operation
ChatterBot copied to clipboard

(sqlite3.OperationalError) cannot change into wal mode from within a transaction

Open feekee opened this issue 8 years ago • 23 comments

>>> bot = ChatBot('new man')

Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\engine\base.py", line 2147, in _wrap_pool_connect
    return fn()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\pool.py", line 387, in connect
    return _ConnectionFairy._checkout(self)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\pool.py", line 766, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\pool.py", line 516, in checkout
    rec = pool._do_get()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\pool.py", line 1229, in _do_get
    return self._create_connection()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\pool.py", line 333, in _create_connection
    return _ConnectionRecord(self)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\pool.py", line 461, in __init__
    self.__connect(first_connect_check=True)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\pool.py", line 663, in __connect
    pool.dispatch.connect(self.connection, self)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\event\attr.py", line 218, in __call__
    fn(*args, **kw)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\chatterbot\storage\sql_storage.py", line 70, in set_sqlite_pragma
    dbapi_connection.execute('PRAGMA journal_mode=WAL')
sqlite3.OperationalError: cannot change into wal mode from within a transaction

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

Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    bot = ChatBot('new man')
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\chatterbot\chatterbot.py", line 39, in __init__
    self.storage = utils.initialize_class(storage_adapter, **kwargs)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\chatterbot\utils.py", line 33, in initialize_class
    return Class(**kwargs)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\chatterbot\storage\sql_storage.py", line 77, in __init__
    if not self.engine.dialect.has_table(self.engine, 'Statement'):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\dialects\sqlite\base.py", line 1181, in has_table
    connection, "table_info", table_name, schema=schema)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\dialects\sqlite\base.py", line 1572, in _get_table_pragma
    cursor = connection.execute(statement)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\engine\base.py", line 2063, in execute
    connection = self.contextual_connect(close_with_result=True)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\engine\base.py", line 2112, in contextual_connect
    self._wrap_pool_connect(self.pool.connect, None),
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\engine\base.py", line 2151, in _wrap_pool_connect
    e, dialect, self)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\engine\base.py", line 1465, in _handle_dbapi_exception_noconnection
    exc_info
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\util\compat.py", line 203, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\util\compat.py", line 186, in reraise
    raise value.with_traceback(tb)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\engine\base.py", line 2147, in _wrap_pool_connect
    return fn()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\pool.py", line 387, in connect
    return _ConnectionFairy._checkout(self)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\pool.py", line 766, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\pool.py", line 516, in checkout
    rec = pool._do_get()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\pool.py", line 1229, in _do_get
    return self._create_connection()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\pool.py", line 333, in _create_connection
    return _ConnectionRecord(self)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\pool.py", line 461, in __init__
    self.__connect(first_connect_check=True)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\pool.py", line 663, in __connect
    pool.dispatch.connect(self.connection, self)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sqlalchemy\event\attr.py", line 218, in __call__
    fn(*args, **kw)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\chatterbot\storage\sql_storage.py", line 70, in set_sqlite_pragma
    dbapi_connection.execute('PRAGMA journal_mode=WAL')
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) cannot change into wal mode from within a transaction

>>> bot = ChatBot('new man')
after this states 

(sqlite3.OperationalError) cannot change into wal mode from within a transaction

feekee avatar Dec 21 '17 14:12 feekee

the python version is 3.6.0 I don't know whether affect it

feekee avatar Dec 21 '17 14:12 feekee

I'm facing the same problem and have searched for hours. But I can't solve it, still

linkeeer avatar Dec 23 '17 14:12 linkeeer

@gunthercox Just tried to reproduce the error with newer versions, seems that 0.7.4 is the latest release without the error. Problem starts occurring in version 0.7.5.

chamkank avatar Feb 08 '18 22:02 chamkank

@chamkank Thank you. That might prove helpful in tracking down the cause.

gunthercox avatar Feb 21 '18 00:02 gunthercox

I am trapped in this problem in a virtualenv environment, while it can run without error with macos system python3.

codexpage avatar Mar 09 '18 19:03 codexpage

@chamkank How to install ver. 0.7.4? I am facing this issue in latest ver 0.8.7 of chatterbot

mohitatgithub avatar Jul 05 '18 06:07 mohitatgithub

@mohitatgithub pip install --upgrade chatterbot==0.7.4

vkosuri avatar Jul 05 '18 19:07 vkosuri

I'm going to close this ticket off. ChatterBot's SQL Storage adapter now has relatively proficient test coverage and I believe the issue that had caused this error has been fixed.

gunthercox avatar Nov 25 '18 15:11 gunthercox

@gunthercox the issue is still there.. I just needed to downgrade to v, 0.7.4 to make the library work.

giovannipiccinelli avatar Nov 26 '18 13:11 giovannipiccinelli

@giovannipiccinelli Can you post any steps or instructions that I can use to recreate this error?

gunthercox avatar Nov 27 '18 03:11 gunthercox

I am using pythonanywhere python 3.6 and the error thrown looks similar to the one posted by Feekee at the top.

The ChatBot object does not get initialized for some reasons. Amazing library by the way 👍

screen shot 2018-11-27 at 8 53 18 am

giovannipiccinelli avatar Nov 27 '18 07:11 giovannipiccinelli

i too had the same issue, downgrading it to 0.7.4 solved the issue.

Allwin12 avatar Feb 04 '19 07:02 Allwin12

I am running the following code with latest version and encountered the same problem. from chatterbot.trainers import ListTrainer from chatterbot import ChatBot

chatbot = ChatBot("Ron Obvious", storage_adapter='chatterbot.storage.SQLStorageAdapter', database_uri='sqlite:///database.sqlite3' ) conversation = [ "Hello", "Hi there!", "How are you doing?", "I'm doing great.", "That is good to hear", "Thank you.", "You're welcome." ]

trainer = ListTrainer(chatbot) trainer.train(conversation) response = chatbot.get_response("good morning") print(response)

So downloaded to 0.7.4 version as per the comments. Now I get the following error: Traceback (most recent call last): File "/Users/Prasanna/PycharmProjects/VMesgBot/sandbox/samples.py", line 17, in trainer.train(conversation) File "/Users/Prasanna/Environments/NLP_AI/lib/python3.6/site-packages/chatterbot/trainers.py", line 83, in train statement = self.get_or_create(text) File "/Users/Prasanna/Environments/NLP_AI/lib/python3.6/site-packages/chatterbot/trainers.py", line 27, in get_or_create statement = self.storage.find(statement_text) AttributeError: 'ChatBot' object has no attribute 'find'

So I updated chatbot to latest version and changed the sqladapter to mongodb. Everything works fine. I think the problem is with sqlite.

pwalimbe avatar Mar 13 '19 09:03 pwalimbe

1.0.2

Traceback (most recent call last): File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\engine\base.py", line 2228, in _wrap_pool_connect return fn() File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool.py", line 434, in connect return _ConnectionFairy._checkout(self) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool.py", line 831, in _checkout fairy = _ConnectionRecord.checkout(pool) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool.py", line 563, in checkout rec = pool._do_get() File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool.py", line 1355, in _do_get return self._create_connection() File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool.py", line 379, in _create_connection return _ConnectionRecord(self) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool.py", line 508, in init self.__connect(first_connect_check=True) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool.py", line 722, in __connect pool.dispatch.connect(self.connection, self) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\event\attr.py", line 259, in call fn(*args, **kw) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\chatterbot\storage\sql_storage.py", line 43, in set_sqlite_pragma dbapi_connection.execute('PRAGMA journal_mode=WAL') sqlite3.OperationalError: cannot change into wal mode from within a transaction

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

Traceback (most recent call last): File "d:\program files (x86)\microsoft visual studio\2019\preview\common7\ide\extensions\microsoft\python\core\ptvsd_launcher.py", line 119, in vspd.debug(filename, port_num, debug_id, debug_options, run_as) File "d:\program files (x86)\microsoft visual studio\2019\preview\common7\ide\extensions\microsoft\python\core\Packages\ptvsd\debugger.py", line 39, in debug run() File "d:\program files (x86)\microsoft visual studio\2019\preview\common7\ide\extensions\microsoft\python\core\Packages\ptvsd_main_.py", line 316, in run_file runpy.run_path(target, run_name='main') File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 263, in run_path pkg_name=pkg_name, script_name=fname) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 96, in _run_module_code mod_name, mod_spec, pkg_name, script_name) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "G:\Demo\Python\ChatterBotDemo1\ChatterBotDemo1\ChatterBotDemo1.py", line 3, in chatbot = ChatBot("Ron Obvious") File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\chatterbot\chatterbot.py", line 34, in init self.storage = utils.initialize_class(storage_adapter, **kwargs) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\chatterbot\utils.py", line 47, in initialize_class return Class(*args, **kwargs) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\chatterbot\storage\sql_storage.py", line 46, in init if not self.engine.dialect.has_table(self.engine, 'Statement'): File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\dialects\sqlite\base.py", line 1357, in has_table connection, "table_info", table_name, schema=schema File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\dialects\sqlite\base.py", line 1799, in _get_table_pragma cursor = connection.execute(statement) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\engine\base.py", line 2143, in execute connection = self.contextual_connect(close_with_result=True) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\engine\base.py", line 2192, in contextual_connect self._wrap_pool_connect(self.pool.connect, None), File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\engine\base.py", line 2232, in _wrap_pool_connect e, dialect, self File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\engine\base.py", line 1528, in _handle_dbapi_exception_noconnection util.raise_from_cause(sqlalchemy_exception, exc_info) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\util\compat.py", line 296, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=cause) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\util\compat.py", line 276, in reraise raise value.with_traceback(tb) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\engine\base.py", line 2228, in _wrap_pool_connect return fn() File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool.py", line 434, in connect return _ConnectionFairy._checkout(self) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool.py", line 831, in _checkout fairy = _ConnectionRecord.checkout(pool) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool.py", line 563, in checkout rec = pool._do_get() File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool.py", line 1355, in _do_get return self._create_connection() File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool.py", line 379, in _create_connection return _ConnectionRecord(self) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool.py", line 508, in init self.__connect(first_connect_check=True) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool.py", line 722, in __connect pool.dispatch.connect(self.connection, self) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\event\attr.py", line 259, in call fn(*args, **kw) File "C:\Users\qcjxb\AppData\Local\Programs\Python\Python36\lib\site-packages\chatterbot\storage\sql_storage.py", line 43, in set_sqlite_pragma dbapi_connection.execute('PRAGMA journal_mode=WAL') sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) cannot change into wal mode from within a transaction (Background on this error at: http://sqlalche.me/e/e3q8)

qcjxberin avatar Jan 03 '20 04:01 qcjxberin

I am trying to implement a chatterbot chatbot (corpus trainer) and having same issue. So I had to install chatterbot version 0.7.4 but then I got an "Attribute error", it says ChatBot has no attribute 'find'. I search many places and found that I need to increase the version of chatterbot. I update it to 1.0.2 but again I'm getting this error. :") Any suggestion?

ayank007 avatar Nov 28 '20 17:11 ayank007

ChatterBot 0.74 works fine!!!

dinesh-develops avatar Dec 20 '20 13:12 dinesh-develops

Guys this issue is open for so long, and I think there is no solution here Having the same error

Traceback (most recent call last):
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\engine\base.py", line 2336, in _wrap_pool_connect
    return fn()
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool\base.py", line 364, in connect
    return _ConnectionFairy._checkout(self)
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool\base.py", line 778, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool\base.py", line 495, in checkout
    rec = pool._do_get()
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool\impl.py", line 241, in _do_get
    return self._create_connection()
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool\base.py", line 309, in _create_connection
    return _ConnectionRecord(self)
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool\base.py", line 440, in __init__
    self.__connect(first_connect_check=True)
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool\base.py", line 668, in __connect
    pool.dispatch.connect(self.connection, self)
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\event\attr.py", line 261, in __call__
    fn(*args, **kw)
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\chatterbot\storage\sql_storage.py", line 43, in set_sqlite_pragma
    dbapi_connection.execute('PRAGMA journal_mode=WAL')
sqlite3.OperationalError: cannot change into wal mode from within a transaction

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

Traceback (most recent call last):
  File "C:/Users/Namaz/PycharmProjects/RAT/CHAT-BOT.py", line 5, in <module>
    chatbot = ChatBot('Charlie')
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\chatterbot\chatterbot.py", line 28, in __init__
    self.storage = utils.initialize_class(storage_adapter, **kwargs)
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\chatterbot\utils.py", line 33, in initialize_class
    return Class(*args, **kwargs)
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\chatterbot\storage\sql_storage.py", line 46, in __init__
    if not self.engine.dialect.has_table(self.engine, 'Statement'):
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\dialects\sqlite\base.py", line 1666, in has_table
    connection, "table_info", table_name, schema=schema
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\dialects\sqlite\base.py", line 2180, in _get_table_pragma
    cursor = connection.execute(statement)
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\engine\base.py", line 2234, in execute
    connection = self._contextual_connect(close_with_result=True)
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\engine\base.py", line 2302, in _contextual_connect
    self._wrap_pool_connect(self.pool.connect, None),
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\engine\base.py", line 2340, in _wrap_pool_connect
    e, dialect, self
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\engine\base.py", line 1584, in _handle_dbapi_exception_noconnection
    sqlalchemy_exception, with_traceback=exc_info[2], from_=e
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\util\compat.py", line 182, in raise_
    raise exception
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\engine\base.py", line 2336, in _wrap_pool_connect
    return fn()
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool\base.py", line 364, in connect
    return _ConnectionFairy._checkout(self)
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool\base.py", line 778, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool\base.py", line 495, in checkout
    rec = pool._do_get()
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool\impl.py", line 241, in _do_get
    return self._create_connection()
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool\base.py", line 309, in _create_connection
    return _ConnectionRecord(self)
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool\base.py", line 440, in __init__
    self.__connect(first_connect_check=True)
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\pool\base.py", line 668, in __connect
    pool.dispatch.connect(self.connection, self)
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\sqlalchemy\event\attr.py", line 261, in __call__
    fn(*args, **kw)
  File "C:\Users\Namaz\AppData\Local\Programs\Python\Python36\lib\site-packages\chatterbot\storage\sql_storage.py", line 43, in set_sqlite_pragma
    dbapi_connection.execute('PRAGMA journal_mode=WAL')
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) cannot change into wal mode from within a transaction
(Background on this error at: http://sqlalche.me/e/13/e3q8)

Process finished with exit code 1

UBISOFT-1 avatar Jan 24 '21 04:01 UBISOFT-1

Downgrading to 0.7.4 as said above should not be a option it should be fixed here, or is it a problem with python 3.6 ? Does changing the Python Version affect this?

UBISOFT-1 avatar Jan 24 '21 04:01 UBISOFT-1

Changing the Adapter to MongoDB does not change the situation here as well :(

UBISOFT-1 avatar Jan 24 '21 04:01 UBISOFT-1

Downgrading to .7.4 worked for me, however, I ran into bug #1426 that is now closed, but I found a syntax workaround mentioned there. It appears others are running into other issues going down to .7.4, and I just hope I somehow avoid that. Would hate to get squeezed out by bugs occurring in various releases. Bump for this one being a high priority. Either way, I am still excited to work with this, and aside from the bugs I had to navigate, the simplicity of use for such complex tasks is quite amazing.

sittingJacks avatar Mar 03 '21 16:03 sittingJacks

Did anyone find a fix to this? I am having the same problem. Python 3.8 and Chatterbot==1.0.2. Downgrading to 0.7.4 is not a good solution for me as a lot of dependencies are no longer supported, and it causes other parts of my program to fail out.

CarolineMorton avatar Mar 26 '21 21:03 CarolineMorton

Did anyone find a fix to this? I am having the same problem. Python 3.8 and Chatterbot==1.0.2. Downgrading to 0.7.4 is not a good solution for me as a lot of dependencies are no longer supported, and it causes other parts of my program to fail out.

So I had been having various issues including this one with my setup. I was @ .7.4 for a while, but decided to make another attempt to get things working at the latest release. I did a reinstall of chatterbot and ALL dependencies as an admin in command terminal (windows), and all issues got resolved.

sittingJacks avatar Mar 27 '21 01:03 sittingJacks