[Zope] Help needed on ZPyGreSQLDA and empty query result.

Gilles.Lavaux gilles.lavaux@esrin.esa.it
Tue, 23 Feb 1999 11:56:37 +0100


Hello All,

I have a problem with the PostgreSQL module and empty query result:

When a select query (named TestSearch bellow) return no tuple, the message
is 'Error, exceptions.IndexError: tuple index out of range'
In case of a Gadfly DB, the same query will return:'There was no data
matching this select test query'

My problem is that this query SQL method is use in a <!--#IN tag:
<!--#in TestSearch size=50 start=query_start-->
   <!--#if sequence-start-->
      <!--#if previous-sequence-->etc...

This cause a 'system unavailable' page to be rendered, instead of a ' no
record something...'

Do you know any workarround or DTML error trapping solution? Is it a bug
inthe ZPyGreSQLDA module itself ? If yes it it inside the 'query' function?
I actualy use an external method to filter the records, shall I also use a
external method to do a 'try: except:' test on the TestSearch ?


Thanks For any solution/help.

Gilles

gilles.lavaux@mail.esrin.esa.it