I occasionally get tracebacks like

    No input for required field
    Traceback (innermost last):
      File /home/killer-whale/skip/src/Zope/lib/python/ZPublisher/Publish.py, line 
222, in publish_module
      File /home/killer-whale/skip/src/Zope/lib/python/ZPublisher/Publish.py, line 
136, in publish
      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)


mailed to me from my production web server (5-10 times per day).  I have
been so far unable to figure out what request is coming into Zope that is
triggering it by examining the Zope and Apache server logs (I run Zope
behind an Apache proxy).  Every time I search the log files in the vicinity
of the mail message's timestamp, I see nothing wrong.  I would like to
instrument the Zope code to generate a traceback that has a more useful
message than "(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 am completely unfamiliar with the code involved in the above traceback,
and only get such tracebacks on my production server, so I need to get it
right the first time.  (If I muff it, it will almost certainly not break
until right after have watched it for 10 hours, then left for the day,
allowing the server to choke for 12-15 hours before I come in the next
day...)  I'd like to enclose one of the calls in the above traceback in a
try: ... except ValueError: ... statement whose except clause reraises the
exception with the relevant data that will tell me just what method was
invoked and what parameters, if any, it's receiving.  I think the
HTTPRequest class probably contains the useful bits, but I have no idea what
those bits might be.  (What is the saying about things that are sufficiently
subtle appear to be magic to the observer?)


Skip Montanaro ([EMAIL PROTECTED])

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to