I'm using SQLAlchemy==1.0.9 and Flask-SQLAlchemy==2.1 in my Flask application and want to connect to a sqlite db.
I get the error
TypeError: Invalid argument(s) 'pool_size' sent to create_engine(), using configuration SQLiteDialect_pysqlite/NullPool/Engine.
because flask_sqlalchemy always tries to create the engine with the pool_size parameter.
As far as I understand the parameter pool_size is not allowed as an argument for the DefaultEngineStrategy in SQLAlchemy.
Does anyone know a workaround for this issue?
I fixed this in my Flask/SQLALchemy/SQLite unit tests by adding two Flask configuration parameters:
app.config.update({
'SQLALCHEMY_POOL_SIZE': None,
'SQLALCHEMY_POOL_TIMEOUT': None
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With