-
Notifications
You must be signed in to change notification settings - Fork 145
Using psycopg2 connection_factory throws exceptions #402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for reporting the issue. Could you provide
These can be great helpful to us in fixing the issue faster. |
I can't get you stack logs, but here's a more complete example which basically does nothing, but if you try calling
|
Hi @mjgp2, I am not able to reproduce locally. Could you help provide full code example of how you setup |
I think perhaps it's similar to this issue: #350 I really should have given better steps to reproduce at the time, apologies. I'm going to close this for now. |
If using a connection factory, the connections are double wrapped and exceptions are thrown from psycopg2 type checking, e.g.
TypeError: argument 2 must be a connection, cursor or None
e.g.
The workaround in the connection factory is to use
connect.__wrapped__
instead ofconnect
- then the connections are single wrapped.The text was updated successfully, but these errors were encountered: