[Zope] invalid property value: wrapped object
Jonathan
dev101 at magma.ca
Thu Mar 8 13:20:38 EST 2007
----- Original Message -----
From: "Anthony Monta" <apbmonta at yahoo.com>
To: <zope at 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
More information about the Zope
mailing list