Psycopg2: 'module' object has no attribute 'connect ...
https://www.py4u.net/discuss/226829I'm trying to connect to a postgres database with psycopg2: import psycopg2 try: conn = psycopg2.connect("dbname='puppetdb' user='puppetdb' host='172.17.0.1' port='5432' password='puppetdb'") except Exception, e: print "I am unable to connect to the database" print e . Which returns: I am unable to connect to the database 'module' object has no attribute 'connect'