Re: Psycopg2 : error message.

From: Dorian Hoxha <dorian(dot)hoxha(at)gmail(dot)com>
To: image <lcelati(at)latitude-geosystems(dot)com>
Cc: PostgreSql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Psycopg2 : error message.
Date: 2014-05-16 10:23:10
Message-ID: CANsFX04XLSCFU+=myBarQ3irQWDFg3KSrPNeRi+3-KTtVMHnNQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Try to use:

dont catch the exception when you make the connection, to see the right
error

because: "i am unable to connect" may mean different things: 1.wrong user
2.wrong pass 3.server down etc

On Fri, May 16, 2014 at 12:12 PM, image <lcelati(at)latitude-geosystems(dot)com>wrote:

> Dear all,
>
> I'm writing a python script for a web service. I have to connect to my
> postgres/postgis databases via Psycopg2.
>
> I writed a little first script just to connect to my pg/postgis db and drop
> a test db.
>
> But when i execute the python file, i have several error messages.
>
> Please read the 2 usefull files below :
>
> pg_test.py
> <http://postgresql.1045698.n5.nabble.com/file/n5804197/pg_test.py>
>
> SS_dos.JPG
> <http://postgresql.1045698.n5.nabble.com/file/n5804197/SS_dos.JPG>
>
>
> In advance, thank you to throw light for me.
>
> Regards.
>
> IMAGE
>
>
>
> --
> View this message in context:
> http://postgresql.1045698.n5.nabble.com/Psycopg2-error-message-tp5804197.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message image 2014-05-16 10:41:15 Re: Psycopg2 : error message.
Previous Message image 2014-05-16 10:12:48 Psycopg2 : error message.