That's a name resolution error. Make sure localhost is defined in your
/etc/hosts (or equivalent) file and also try 127.0.0.1.
Randall
Stephane Bortzmeyer wrote:
> On Mon, Jul 11, 2005 at 10:59:55PM -0500,
> Randall Smith <[EMAIL PROTECTED]> wrote
> a message of 32 lines which said:
>
>
>>I replaced the C portion of PyGreSQL to form a Python driver I'm
>>calling pypg. You can download it from the location below.
>
>
> I was planning to test its performance, using the test we developed to
> compare psycopg and PoPy, but it always fail (do note that I was
> trying to use the local connection, "host" is empty, but if I specify
> "host=localhost", I get the same error):
>
> Traceback (most recent call last):
> File "test.py", line 110, in ?
> connection = db_module.connect("dbname=db-comp-registry")
> File "/usr/local/lib/python2.3/site-packages/pypg/pgdb2.py", line 413, in
> connect
> dbtty, dbuser, dbpasswd)
> File "/usr/local/lib/python2.3/site-packages/pypg/_mypg.py", line 175, in
> connect
> return Connection(dbhost, dbport, dbbase, dbuser, dbpasswd)
> File "/usr/local/lib/python2.3/site-packages/pypg/_mypg.py", line 58, in
> __init__
> self.connect()
> File "/usr/local/lib/python2.3/site-packages/pypg/_mypg.py", line 62, in
> connect
> sock.connect((self.host, self.port))
> File "<string>", line 1, in connect
> socket.gaierror: (-2, 'Name or service not known')
_______________________________________________
DB-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/db-sig