[Zope3-Users] WrongContainedType

Tim Cook timothywayne.cook at gmail.com
Fri Oct 10 12:12:51 EDT 2008


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.

Cheers,
Tim



-- 
Timothy Cook, MSc
Health Informatics Research & Development Services
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook 
Skype ID == timothy.cook 
**************************************************************
*You may get my Public GPG key from  popular keyservers or   *
*from this link http://timothywayne.cook.googlepages.com/home*
**************************************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20081010/0af3052d/attachment.bin 


More information about the Zope3-users mailing list