I am following this tutorial which is brilliant to learn Flask.

I typed in all the code to create a database using SQLAlchemy-Migrate , but when I run db_create.py, I get an error saying

'Could not determine dialect for SQLite'

没有正确的解决方案

其他提示

You have an error in your SQLALCHEMY_DATABASE_URI connection string; the driver value is case sensitive, you cannot capitalize SQLite in it, it has to be all lowercase:

SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'app.db')

The exception you see is thrown by SQLAlchemy trying to use the first part of the connection string to find the right database dialect, and it won't find SQLite, but will work for sqlite.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top