TypeError: Invalid argument(s) 'pool_size' sent to create_engine() when using sqlite
wadechristie opened this issue · 2 comments
wadechristie commented
Checkout: 1f31678
Fresh install using sqlite db driver.
Error:
Traceback (most recent call last):
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/flask/app.py", line 1836, in __call__
return self.wsgi_app(environ, start_response)
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/wchristie/opt/pbnh/pbnh/app/views.py", line 72, in view_paste
query = util.getPaste(paste_id)
File "/home/wchristie/opt/pbnh/pbnh/app/util.py", line 69, in getPaste
username=config.get('username')) as pstr:
File "/home/wchristie/opt/pbnh/pbnh/db/paste.py", line 26, in __enter__
self.engine = create_engine(connection, pool_size=1)
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/sqlalchemy/engine/__init__.py", line 386, in create_engine
return strategy.create(*args, **kwargs)
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/sqlalchemy/engine/strategies.py", line 144, in create
engineclass.__name__))
TypeError: Invalid argument(s) 'pool_size' sent to create_engine(), using configuration SQLiteDialect_pysqlite/NullPool/Engine. Please check that the keyword arguments are appropriate for this combination of components.
jetpacktuxedo commented
Interesting, I figured that flag would just be ignored when sent to a db that didn't support it. I'll poke at it.
jetpacktuxedo commented
Should be good to go now. It now only adds that flag if the dialect is set to postgresql.