Skip Montanaro writes:
> I occasionally get tracebacks like
> No input for required field
> File /home/dolphin/skip/src/Zope/lib/python/ZPublisher/HTTPRequest.py, line
>445, in processInputs
> File /home/dolphin/skip/src/Zope/lib/python/ZPublisher/Converters.py, line
>115, in field2required
> ValueError: (see above)
> The ValueError is being raised in field2required, but I see no parameters in
> the Apache log with a name of "...:required". That leads me to suspect that
> somehow the RESPONSE parameter isn't getting set (it's the only
> non-defaulted parameter in the suspect published methods that doesn't appear
> to have its value set directly by parameters in the URL).
I suspect the problem comes from a "POST" operation.
You will not see POST operation parameters in the web server log
It is highly unlikely that a missing RESPONSE causes the problem.
Such an error would be handled at a different place (I think
At line 444 of "ZPublisher/HTTPRequest.py", you will see the following
if (not item and not (flags&DEFAULT) and
item = defaults[key]
item = item
Add "print key; sys.stdout.flush()" before the final "raise".
This will print the corresponding "key" (with is missing).
To get more information: the variable "fslist" contains all
parameters. It is a list of objects. Each object has a "name"
attribute (which gives the form variable name or 'key'),
the object either has a "file" or "value" attribute.
You may look at line 370, to see how it is processed.
You can test your debugging code in your test environment.
Simply create a form with a "xxx:required" variable name
and do not provide a value.
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -