[Zope3-dev] problems with beta release
Ulrich Schreiner
ulrich.schreiner at innuendo.de
Wed Jun 9 10:26:44 EDT 2004
hi,
if i want to add a "ZPT Seite" (german locale, i think in english it's a
"templated page") i get the error "Object is of wrong type".
the "WrongType" error is thrown in
zope.schema._boostrapfields.Field
in the "_validate" method
159 def _validate(self, value):
160 if self._type is not None and not isinstance(value,
self._type):
161 -> import pdb; pdb.set_trace()
162 raise WrongType(value, self._type)
163
164 if self.constraint is not None and not
self.constraint(value):
165 raise ConstraintNotSatisfied(value)
166
(Pdb) p value
'templatesource'
(Pdb) type(value)
<type 'str'>
(Pdb) self._type
<type 'unicode'>
(Pdb) isinstance(value, self._type)
False
(Pdb) cont
well my value is "templatesource" (the string i entered as the source in
the zmi) and is of <type 'str'>, but self._type holds <type 'unicode'>.
hm, what's going wrong? any ideas?
thanks
</usc>
Ulrich Schreiner wrote:
> in germany it's called a "ZPT Seite", i think it is a "templated page".
>
> > I dunno, but I can't reprouce this. :(
>
> ok, i'll debug it :-)
>
> Jim Fulton wrote:
>
>> Ulrich Schreiner wrote:
>>
>>> hi,
>>>
>>> i installed the beta with no problems on my notebook (xp, python
>>> 2.3.3). everything seems fine, but now i wanted to play around and
>>> add a simple page template in the "top" folder and always get the error
>>>
>>> "Object is of wrong type"
>>>
>>> i only added a zpt page with "test" as source and "test" as objectname.
>>
>>
>>
>> You added a "Templated Page", right?
>>
>>> did i miss something?
>>
>>
>>
>> I dunno, but I can't reprouce this. :(
>>
>> Jim
>>
>
> _______________________________________________
> Zope3-dev mailing list
> Zope3-dev at zope.org
> Unsub:
> http://mail.zope.org/mailman/options/zope3-dev/ulrich.schreiner%40innuendo.de
>
>
More information about the Zope3-dev
mailing list