Re: Psycopg2 : error message.

Поиск
Список
Период
Сортировка
От skeeved
Тема Re: Psycopg2 : error message.
Дата
Msg-id etPan.537629be.6b8b4567.173@Adam-Laniers-MacBook-Pro.local
обсуждение исходный текст
Ответ на Re: Psycopg2 : error message.  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: Psycopg2 : error message.
Re: Psycopg2 : error message.
Список pgsql-general
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.
-- 
skeeved

On May 16, 2014 at 9:39:06 AM, Adrian Klaver (adrian.klaver@aklaver.com) wrote:

On 05/16/2014 04:19 AM, image wrote:
> Thanks for your help.
>
> So i remove the first "try" + i remove the space before "conn="
>
> Indeed i have a new error message in my DOS interface :
>
> pg_test.py
> <http://postgresql.1045698.n5.nabble.com/file/n5804207/pg_test.py>
>
> SS_dos.JPG
> <http://postgresql.1045698.n5.nabble.com/file/n5804207/SS_dos.JPG>
>
>
> In advance, thank you.

In the future this is a question that is more appropriate for the
psycopg2 list:

http://www.postgresql.org/list/psycopg/

You also should take a look at here for some basic pointers:

http://initd.org/psycopg/docs/usage.html

FYI it is not necessary to single quote the parameter values in the
connection string.

Lastly, if my high school French is holding up you have an
authentication error for user laurent. The first thing to check would
whether you are using the correct password.



>
> IMAGE.
>
>
>
>
> --
> View this message in context: http://postgresql.1045698.n5.nabble.com/Psycopg2-error-message-tp5804197p5804207.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

В списке pgsql-general по дате отправления:

Предыдущее
От: Graeme Gemmill
Дата:
Сообщение: pgsql in a virtual environment
Следующее
От: Karsten Hilbert
Дата:
Сообщение: Re: Psycopg2 : error message.