[Zope] too many arguments TypeError problem
Peter Bengtsson
mail@peterbe.com
Wed, 22 Aug 2001 17:12:14 +0200
> > # the below line is line 48
> > Photo.Photo.tag(self,REQUEST, display,pdcookie,
> > height,width,alt,args)
> >[...]
> > Error Type: TypeError
> > Error Value: too many arguments; expected 7, got 8
>
> Use:
> Photo.Photo.tag(REQUEST, display,pdcookie,height,width,alt,args)
>
> self is implicitly passed when you use the member notation (Photo.tag).
When I do that I get
Error Type: TypeError
Error Value: unbound Python method must be called with Photo 1st argument
I think that the self I'm passing here is the "zope-self" (I.e. the Whole
zope instance class). Not the Python "class-classic-self".
Photo.Photo.tag == afile.aclass.amethod
Still have to solve this one. Getting desperate :(
Peter
>
> Florent Guillaume
> Nuxeo
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )