emmett-framework / emmett

The web framework for inventors
BSD 3-Clause "New" or "Revised" License
1.06k stars 71 forks source link

TypeError: _reconnect_and_configure() got an unexpected keyword argument 'reuse_if_open' #209

Closed josejachuf closed 6 years ago

josejachuf commented 6 years ago

I think it relates to this [1] introduced in 1.2.3. In production this error occurs (in development works fine):

[2017-11-03 11:40:03,484] ERROR in wsgi: Application exception: Traceback (most recent call last): File "/usr/home/www/venv/lib/python3.6/site-packages/weppy/wsgi.py", line 95, in error_handler return app.common_static_handler(app, environ, start_response) File "/usr/home/www/venv/lib/python3.6/site-packages/weppy/wsgi.py", line 68, in static_handler return dynamic_handler(app, environ, start_response) File "/usr/home/www/venv/lib/python3.6/site-packages/weppy/wsgi.py", line 31, in dynamic_handler app.route.dispatch() File "/usr/home/www/venv/lib/python3.6/site-packages/weppy/expose.py", line 263, in dispatch cls._before_dispatch(route) File "/usr/home/www/venv/lib/python3.6/site-packages/weppy/expose.py", line 247, in _before_dispatch pipe.open() File "/usr/home/www/venv/lib/python3.6/site-packages/weppy/orm/base.py", line 36, in open self.db.connection_open() File "/usr/home/www/venv/lib/python3.6/site-packages/weppy/orm/base.py", line 143, in connection_open return self._adapter.reconnect(reuse_if_open=reuse_if_open) TypeError: _reconnect_and_configure() got an unexpected keyword argument 'reuse_if_open'

[1] https://github.com/gi0baro/weppy/commit/3e8e21b364510336af51854aada139d4afa34b6b

gi0baro commented 6 years ago

@josejachuf which adapter is it?

josejachuf commented 6 years ago

postgres + psycopg2

gi0baro commented 6 years ago

@josejachuf probably I've just find out. Would you try latest master? f220be9 should fix this.

josejachuf commented 6 years ago

@gi0baro , it works fine.

gi0baro commented 6 years ago

@josejachuf thank you. Will release 1.2.6 shortly. (I feel quite ashamed for the 1.2 release cycle, I didn't mean to introduce so many bugs. Forgive me for this)

josejachuf commented 6 years ago

There are no problems I like a lot of weppy