[Zope3-Users] WrongContainedType

Roger Ineichen dev at projekt01.ch
Fri Oct 10 12:19:48 EDT 2008


Hi Tim

> Betreff: Re: AW: [Zope3-Users] WrongContainedType
> 
> On Fri, 2008-10-10 at 17:46 +0200, Roger Ineichen wrote:
> 
> > I guess not, normaly such an error has an empty 
> representation and the 
> > list is not empty. Try to do errors[0] or type(errors[0]) and you 
> > probably see something.
> > 
> > If not I'm confused
> 
> Well, I'm confused anyway, but that isn't difficult. ;-)
> 
> After commenting the the if test on errors and the raise.
> 
> With print 'Object schema validation errors=',type(errors[0]):
> I get:
> Object schema validation errors=
> <class'zope.schema._bootstrapinterfaces.RequiredMissing'>
> Object schema validation errors=
> <class'zope.schema._bootstrapinterfaces.RequiredMissing'>
> 
> With print 'Object schema validation errors=',errors[0]:
> I get:
> just the string Object schema validation errors= printed on each line.
> 
> With print 'Object schema validation errors=',errors:
> I get:
> Object schema validation errors= []
> Object schema validation errors= []
> 
> Just to try to cover all bases.  I uncommented the if test 
> and the only print that changed was the one with just 
> 'errors' (the last one above).
> It produces, as I said before:
> 
> Object schema validation errors= []
> Object schema validation errors= [, []]
> 
> Chasing this down is definitely above my Python abilities.

The error (probably, not sure) means that the object you 
like to store has a missing value. Can you check the
schema of this object and set required=False in all fields?

If there is a problem, can you post the interface and class
of this object as a sample? And probably the code which 
tries to store the object.

Regards
Roger Ineichen



More information about the Zope3-users mailing list