Re: Psycopg2 : error message.

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Psycopg2 : error message.
Date: 2014-05-16 15:14:43
Message-ID: 20140516151443.GD15102@hermes.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, May 16, 2014 at 11:07:42AM -0400, skeeved wrote:

> Looks like you have an invalid connection string:
> conn=psycopg2.connect("dbname='busard_test' user='laurent' host='localhost' password='cactus’")
> Try removing the double quotes, they are obscuring the parameter names and values:
> conn=psycopg2.connect(dbname=‘busard_test', user=‘laurent', host=‘localhost', password='cactus’)
> You were also missing some punctuation between the parameters.

He was using the DSN-as-string variant, not the keyword one.

Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martín Marqués 2014-05-16 15:35:27 Re: pgsql in a virtual environment
Previous Message skeeved 2014-05-16 15:07:42 Re: Psycopg2 : error message.