You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was perplexing for me too, as this works on and off on slight modifications, without good reason. Although I was using the Postgresql class not the factory, a fellow coworker pointed out to try to pass the port that the error refers to:
psycopg2.OperationalError: connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused
And what solved the problem for me (although it worked at times):
I am using python 3.7 and postgresql
I have these as pytest fixtures and when it tries to recreate them the first query throws a connection refused error.
The text was updated successfully, but these errors were encountered: