Search Postgresql Archives

Re: Psycopg2 : error message.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux