Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #71657 > unrolled thread

Re: Psycopg2 : error message.

Started byChris Angelico <rosuav@gmail.com>
First post2014-05-16 21:39 +1000
Last post2014-05-16 21:39 +1000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Psycopg2 : error message. Chris Angelico <rosuav@gmail.com> - 2014-05-16 21:39 +1000

#71657 — Re: Psycopg2 : error message.

FromChris Angelico <rosuav@gmail.com>
Date2014-05-16 21:39 +1000
SubjectRe: Psycopg2 : error message.
Message-ID<mailman.10067.1400240371.18130.python-list@python.org>
On Fri, May 16, 2014 at 8:18 PM, dandrigo <laurent.celati@gmail.com> wrote:
> Please read the 2 usefull files below :
>
> Dandrigo pg_test.py <http://python.6.x6.nabble.com/file/n5057062/pg_test.py>
>
> SS_dos.JPG <http://python.6.x6.nabble.com/file/n5057062/SS_dos.JPG>

These would be MUCH better included inline. Please, in future, copy
and paste the *text* of the error message - don't post a screenshot.

As to the actual problem: You're masking a potentially useful
exception behind a bare except that just prints a generic message *and
then continues*. This is a very bad idea. Don't do it. Take all that
out and just attempt the connection; then you'll get a useful error.
Same further down. Just don't.

ChrisA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web