[Zope] invalid property value: wrapped object

Dieter Maurer dieter at handshake.de
Wed Mar 7 15:29:28 EST 2007


Please stay on the list! I usually do not respond to private email...

List readded.


Anthony Monta wrote at 2007-3-6 13:09 -0800:
>All I have is a form passing stuff through REQUEST to a method that
>maps REQUEST variables to properties explicitly, and passing that to
>the ZClass constructor method.  
>
>Is there any error-message I could parse to see where exactly the
>process goes wrong?  

Usually, you should look at the traceback you find in the so called
"error_log" object (in your Zope "Root Folder" im the ZMI).
It precisely tells you where exceptions are raised in the code
and how you came there -- an incredibly helpful tool to understand
any kind of exception.


In your special case, the traceback may not yet tell you which
property makes the problem.

If you are ready to modify your Zope code (unless you put
Zope into a revision control system, your changes will be lost
with the next Zope version), then you can look at the traceback
and find the place where the exception is raised.
Before this place, you can add an

       __traceback_info__ = <whatever information your are interested in>

In case of a traceback, this information is then included in it.

In your special case, you will use the property id in "__traceback_info__"
to find out which property gives you the problem.


I would approach this problem differently.
I would try to reproduce the problem in an interactive Python interpreter
(under *nix started with "bin/zopectl debug"; for Windows, there are
alternative ways) and use "from pdb import pm; pm()" and then analyse
the exeption state in "pdb".

There is also a Zope product that allows you to do that in a life
Zope system -- but I forgot its name. You need to search for it.



-- 
Dieter


More information about the Zope mailing list