[FIXED] AttributeError: 'module' object has no attribute 'connect' in the pgdb module using python

Issue

    import pgdb
    myConnection = pgdb.connect( host=hostname, user=username, password=password, database=database )
    doQuery( myConnection )
    myConnection.close()

I get the following error when i run the script.

>>> AttributeError: 'module' object has no attribute 'connect'. Please help me out

Solution

The classname is Connection in the repo https://github.com/KehaoWu/pgdb/blob/master/pgdb/pgdb.py#L15

PYPY project pypi.org/project/pgdb



Answered By - Vikas Mulaje
Answer Checked By - Gilberto Lyons (sql.easybugfix Admin)

Related Posts

Post a Comment