Are you actually running PG on port 5433 instead of 5432? Is PG actually listening on 127.0.0.1 (or *)? -- Scott Ribe scott_ribe@xxxxxxxxxxxxxxxx https://www.linkedin.com/in/scottribe/ > On Aug 27, 2022, at 11:02 AM, Alex Christian <alexchristian1198@xxxxxxxxx> wrote: > > Hello, > > I am trying to connect to postgresql using python on windows, but it throws an error message. Below I am sharing the code and error. Can you please help me out on this issue? > Thank you > > <2.png><1.png>