Help needed on ZPyGreSQLDA and empty query result.
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
Gilles - What version of ZPyGreSQLDA are you using? This is a known bug of version 0.1. Version 0.2 is available at http://www.zope.org/Download/Contrib I pulled my old folder out of ZOPEBASE/lib/python/Products, dropped this one in, compiled _pgmodule.so, and all my SQL methods continued to work. (I had previously patched v. 0.1 for this case, but the author's solution is better) Ross -- Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu> NSBRI Research Scientist/Programmer Computer and Information Technology Institute Rice University, 6100 S. Main St., Houston, TX 77005
Gilles, I mailed you a response in line with what Ross posted to the list, but your mail keeps bouncing. Final-Recipient: RFC822; gilles.lavaux@esrin.esa.it Action: failed Status: 5.0.0 Remote-MTA: DNS; maes.esrin.esa.it Diagnostic-Code: SMTP; 550 Access denied Last-Attempt-Date: Tue, 23 Feb 1999 08:42:26 -0800 (PST) This also happened with a couple of previous attempts on questions you had. Maury
participants (3)
-
Gilles.Lavaux -
Maurice Davis -
Ross J. Reedstrom