Question

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'

No correct solution

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top