invalid property value: wrapped object
Hello group: Running Zope 2.6.1/Python 2.1.3, I get the following error when I try to pass form values to a custom ZClass instance-creating method: Error Type: ValueError Error Value: Invalid property value: wrapped object I haven't had to deal with this kind of error before. Does this mean that the wrapped object (aq_parent) has an invalid property value, or does aq_self have the invalid value? What's the most efficient way to debug this? Best, Anthony ____________________________________________________________________________________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com
(Fri, Feb 23, 2007 at 09:39:16AM -0800) Anthony Monta wrote/schrieb/egrapse:
Running Zope 2.6.1/Python 2.1.3, I get the following error when I try to pass form values to a custom ZClass instance-creating method:
2003 called, they want their auctioned off aeron chairs back! Regards, Sascha
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Anthony Monta wrote:
Hello group:
Running Zope 2.6.1/Python 2.1.3, I get the following error when I try to pass form values to a custom ZClass instance-creating method:
Error Type: ValueError Error Value: Invalid property value: wrapped object
I haven't had to deal with this kind of error before. Does this mean that the wrapped object (aq_parent) has an invalid property value, or does aq_self have the invalid value? What's the most efficient way to debug this?
Look at (and post) the *entire* traceback, then look at the code from the "bottom" upward. I don't know if it will work in a Zope 2.6.x site (that's *4* major production releases back!), but you might google for the PDBDebugMode product: it lets you stop right at the point of the exception, and examine variable state, etc. if you are running Zope in foreground / debug mode. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF4K41+gerLs4ltQ4RAj/tAKC2cd3ZYICZMViRVbwwam1WH0fs6ACgr5a7 sSrzBJO/TLAIMmnUsOodzJA= =4Pyd -----END PGP SIGNATURE-----
Anthony Monta wrote at 2007-2-23 09:39 -0800:
Running Zope 2.6.1/Python 2.1.3, I get the following error when I try to pass form values to a custom ZClass instance-creating method:
Error Type: ValueError Error Value: Invalid property value: wrapped object
Apparently, you try to store an acquisition wrapped object into a property. This will not work. -- Dieter
Can someone help me read this? The error_log says: --- Traceback (innermost last): Module ZPublisher.Publish, line 98, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module OFS.DTMLMethod, line 126, in __call__ Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_With, line 76, in render Module DocumentTemplate.DT_With, line 76, in render Module DocumentTemplate.DT_Util, line 201, in eval - __traceback_info__: AAContractZClass_add Module <string>, line 2, in f Module OFS.DTMLMethod, line 119, in __call__ Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_With, line 76, in render Module DocumentTemplate.DT_Util, line 201, in eval - __traceback_info__: REQUEST Module <string>, line 2, in f Module OFS.PropertySheets, line 407, in manage_editProperties Module OFS.PropertySheets, line 218, in _updateProperty Module OFS.PropertySheets, line 179, in _wrapperCheck ValueError: Invalid property value: wrapped object --- I don't know how to read that. What line number is flagged as the problem?
From the log's "other" information, the only thing that looks weird is this:
lpn <Folder instance at 8e8a200> That should be a string instead of a folder instance. My form said this: <tr> <th align="right">Is this an LPN program?</th> <td><input name="lpn" size="5"><br>If so, put a "1" in the box; otherwise, leave it blank.</td> </tr> That is passed to a method that says this: <dtml-call "REQUEST.set('lpn', lpn)"> And the constructor method simply says: <dtml-with "AAContractZClass.createInObjectManager(REQUEST['id'], REQUEST)"> <dtml-call "propertysheets.aacontract_properties.manage_editProperties(REQUEST)"> <dtml-call reindex_object> </dtml-with> But perhaps the error is elsewhere. Any pointers gratefully accepted. ____________________________________________________________________________________ Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
----- Original Message ----- From: "Anthony Monta" <apbmonta@yahoo.com> To: <zope@zope.org> Sent: Thursday, March 08, 2007 1:12 PM Subject: Re: [Zope] invalid property value: wrapped object
Can someone help me read this? The error_log says:
--- Traceback (innermost last): Module ZPublisher.Publish, line 98, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module OFS.DTMLMethod, line 126, in __call__ Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_With, line 76, in render Module DocumentTemplate.DT_With, line 76, in render Module DocumentTemplate.DT_Util, line 201, in eval - __traceback_info__: AAContractZClass_add Module <string>, line 2, in f Module OFS.DTMLMethod, line 119, in __call__ Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_With, line 76, in render Module DocumentTemplate.DT_Util, line 201, in eval - __traceback_info__: REQUEST Module <string>, line 2, in f Module OFS.PropertySheets, line 407, in manage_editProperties Module OFS.PropertySheets, line 218, in _updateProperty Module OFS.PropertySheets, line 179, in _wrapperCheck ValueError: Invalid property value: wrapped object ---
I don't know how to read that. What line number is flagged as the problem?
From the log's "other" information, the only thing that looks weird is this:
lpn <Folder instance at 8e8a200>
That should be a string instead of a folder instance. My form said this:
<tr> <th align="right">Is this an LPN program?</th> <td><input name="lpn" size="5"><br>If so, put a "1" in the box; otherwise, leave it blank.</td> </tr>
That is passed to a method that says this:
<dtml-call "REQUEST.set('lpn', lpn)">
And the constructor method simply says:
<dtml-with "AAContractZClass.createInObjectManager(REQUEST['id'], REQUEST)"> <dtml-call "propertysheets.aacontract_properties.manage_editProperties(REQUEST)"> <dtml-call reindex_object> </dtml-with>
You have a form variable called 'lpn'. When the dtml method receives the form information 'lpn' is already in REQUEST. It looks like you also have a folder called 'lpn'. This stmt: <dtml-call "REQUEST.set('lpn', lpn)"> is causing zope to load a reference to the lpn folder into REQUEST. When you get to the ...createInObjectManager... stmt, REQUEST contains 2 versions of 'lpn' and the folder version is being used instead of the form version. Try removing the <dtml-call "REQUEST.set('lpn', lpn)"> stmt. Jonathan
Jonathan, That did it! You and Dieter solved the problem. Many, many thanks for your lucid explanations! Cheers, A ____________________________________________________________________________________ It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. http://tools.search.yahoo.com/toolbar/features/mail/
participants (5)
-
Anthony Monta -
Dieter Maurer -
Jonathan -
Sascha Welter -
Tres Seaver