Marco Bizzarri wrote at 2005-7-19 10:31 +0200:
... I've a custom standard_error_html page, made with a Zope Page Template. I'm trying to provide a custom __str__ for a custom exception. This works, most of the time, but in some cases I encounter the following error:
TypeError: unbound method __str__() must be called with InvalidFolderId instance as first argument (got nothing instead)
As usual, you must get and look at the corresponding traceback. It will tell you where "__str__" is inappropriately used. If the error is generated from your "standard_error_message" (what you might call "standard_error_html" -- Note: it is very important to use the precise names!), then it may not be that easy to get the traceback. In our Zope copy, I have introduced a log call in case "standard_error_message" raises an exception to get at this traceback. The place for this measure is in "OFS.SimpleItem.SimpleItem.raise_standard_error" (or similarly named). -- Dieter