Psycopg2 doesn't work on Windows.
Remove clearly rubbish last_connection nonsense.