[Zope] server error with optional args to Z SQL method
Tim Potter
Tim.Potter@anu.edu.au
Fri, 6 Aug 1999 17:49:35 +1000 (EST)
Just one more question for today. (-:
I'm trying to create some optional arguments in Zope 2.0.0b1 to a Z
SQL method using the sqlgroup and sqltest tags. My query is
select * from links
<!--#sqlgroup where-->
<!--#sqltest link_num type=int optional-->
<!--#or-->
<!--#sqltest parent type=int optional-->
<!--#/sqlgroup-->
and I've given it arguments of
link_num:int parent:int
There doesn't seem to be a way to make the arguments optional (or at
least ignore empty values) as if I change and test this query, leaving
one of the arguments empty, I get an 'Error response Error code 500.
Message: Internal Server Error' from Zope, and the following error on
the xterm which started up Zope
1999-08-06T07:21:50 ERROR(200) ZServer Server Error: exceptions.ValueError, Empty entry when <strong>integer</strong> expected: file: /scratch/zope/Zope-2.0.0b1-linux2-x86/lib/python/ZPublisher/Converters.py line: 124
It's pretty obvious that Zope thinks I should have supplied a value
for another parameter, but I think the fact it causes an exception is
a bug.
I'm having great fun at the moment writing an interface to a HTML
links database. All the links are stored in a MySQL table and Zope
provides a super-nifty front end with a tree based navigation system.
Zope is awesome!
On another note, is there any chance of a searchable mailing list
index being made for this list? I use google, but there seems to have
been some reorganisation of the site since it was last indexed and all
the pipermail links are broken. )-:
Tim.
--
Tim Potter, System Admin/Programmer "Disco Stu doesn't advertise"
Advanced Computational Systems CRC, RSISE Bldg Australian National University,
Canberra 0200, AUSTRALIA Ph: +61 2 62798813 Fax: +61 2 62798602