gunthercox / ChatterBot

ChatterBot is a machine learning, conversational dialog engine for creating chat bots
https://chatterbot.readthedocs.io
BSD 3-Clause "New" or "Revised" License
14.06k stars 4.44k forks source link

I am not sure what is wrong but when I run it this is what appears. #2274

Open IsaiMar opened 1 year ago

IsaiMar commented 1 year ago

Traceback (most recent call last): File "c:\Users\isaig\Dropbox\My PC (DESKTOP-K5PUFQD)\Documents\BYUI\2022\Fall\AI Society\chatbot\chatbot.py", line 5, in my_bot = ChatBot(name='Chatbot', read_only=True, File "C:\Users\isaig\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\chatterbot\chatterbot.py", line 28, in init
self.storage = utils.initialize_class(storage_adapter, *kwargs) File "C:\Users\isaig\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\chatterbot\utils.py", line 33, in initialize_class
return Class(
args, **kwargs) File "C:\Users\isaig\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\chatterbot\storage\sql_storage.py", line 46, in init if not self.engine.dialect.has_table(self.engine, 'Statement'): File "C:\Users\isaig\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\sqlalchemy\dialects\sqlite\base.py", line 2016, in has_table self._ensure_has_table_connection(connection) File "C:\Users\isaig\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\sqlalchemy\engine\default.py", line 342, in _ensure_has_table_connection raise exc.ArgumentError( sqlalchemy.exc.ArgumentError: The argument passed to Dialect.has_table() should be a <class 'sqlalchemy.engine.base.Connection'>, got <class 'sqlalchemy.engine.base.Engine'>. Additionally, the Dialect.has_table() method is for internal dialect use only; please use inspect(some_engine).has_table(<tablename>>) for public API use.

flumius commented 1 year ago

I got this error after upgrading SQLAlchemy to version 1.4. When I upgraded I got a message saying only 1.2 - 1.3 was supported. Hopefully this can lead to a solution.