From: Dave S. <Dst...@em...> - 2002-06-13 20:30:02
|
Hmmm.... Still getting: Dave Strickler CEO DWS - "The GroupWise Integration Experts" Boston * Austin * Belgium * Denmark http://www.emailsolutions.com (800) 999-5412 x10 ------------------------------------ Want to get rid of SPAM, Viruses, and unwanted content? MailWise Filter - "The E-Mail Firewall (tm) for Your Company" See http://www.emailsolutions.com/MailWise >>> from pyPgSQL import PgSQL >>> db = PgSQL.connect(database='xamime', user='root', host='10.0.0.21') Traceback (most recent call last): File "<pyshell#2>", line 1, in ? db = PgSQL.connect(database='xamime', user='root', host='10.0.0.21') File "C:\PYTHON22\Lib\site-packages\pyPgSQL\PgSQL.py", line 1591, in connect return Connection(connInfo) File "C:\PYTHON22\Lib\site-packages\pyPgSQL\PgSQL.py", line 1689, in __init__ raise DatabaseError, m DatabaseError: FATAL 1: No pg_hba.conf entry for host 10.0.0.120, user root, database xamime The problem here being I don't know what I'm doing wrong. Is this a syntax issue, a rights issue, or a bug (doubt it the latter). TIA, >>> "Billy G. Allie" <Bil...@mu...> 06/13/02 03:17PM >>> "Dave Strickler" wrote: > I tried to to this, and the "from" command worked, and I got a lot > further. But, as you can see from below, it wasn't 100% sucsessful. Any > clues as to what is going wrong? I made a pg_hba.conf in the PgSQL > directory, and added in my 10.0.0.120 address (that's my workstation), > but it didn't help. > > Any clues? > ======================================== > > >>> dsn = "dbname='xamime' user='root' host='10.0.0.21'" > >>> db = PgSQL.connect(dsn) The syntax for connect requires either a string in the form of: 'host:port:database:user:password:options:tty' i.e: dsn = '10.0.0.21::xamime:root' db = PgSQL.connect(dsn) or passing named parameters: db = PgSQL.connect(database='xamime', user='root', host='10.0.0.21') See the README file and the DB-API 2.0 spec for more details. Later. ___________________________________________________________________________ ____ | Billy G. Allie | Domain....: Bil...@mu... | /| | 7436 Hartwell | MSN.......: B_G...@em... |-/-|----- | Dearborn, MI 48126| |/ |LLIE | (313) 582-1540 | _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink _______________________________________________ Pypgsql-users mailing list Pyp...@li... https://lists.sourceforge.net/lists/listinfo/pypgsql-users |