[AG-DEV] args to function calls
Michael Braitmaier
braitmaier at hlrs.de
Mon Aug 8 02:27:58 CDT 2005
>From the error message I assume you call
clientPrivateId=self.currentvenue.FindUserByProfile(self, participant)
instead of
clientPrivateId=self.currentvenue.FindUserByProfile(participant)
Did you check whether there is a "self" in your call to FindUserbyProfil() ?
Michael
----- Original Message -----
From: "Michael Miller" <mimiller at ncsa.uiuc.edu>
To: <ag-dev at mcs.anl.gov>
Sent: Friday, August 05, 2005 10:51 PM
Subject: [AG-DEV] args to function calls
> So I exposed another function via the VenueIW. The funciton is
> FindUserByProfile(self, profile)
>
> Here's the code I'm using to call it:
>
> #I do this in another function to get the venue object
> self.currentvenue = VenueIW(self.venueDesc.GetURI())
>
> #Then later on I do this:
> clientPrivateId=self.currentvenue.FindUserByProfile(participant)
>
>
> #Here's the error I get:
> Traceback (most recent call last):
> File "/usr/lib/python2.3/site-packages/SOAPpy/Server.py", line 407, in
> do_POST fr = apply(f, ordered_args, named_args)
> TypeError: FindUserByProfile() takes exactly 2 arguments (3 given)
>
> So my confusion is that I believe I'm only giving 2 arguments, "self" and
> "participant", what's the third one and where's it coming from? It sure
> would be nice if I could get to python to print the args, but putting
> this:
>
> print "config special args"
> print("call=",f, ordered_args, named_args)
>
> on lines 405 and 406 in
> "/usr/lib/python2.3/site-packages/SOAPpy/Server.py" doesn't print anything
> to the screen. (yes, I'm looking at the right console...)
>
> Any ideas?
>
> MYK
>
> --
> Thanx,
>
> Michael Miller
> System Engineer
> Video Technology Services
> Persistent Infrastructure Directorate
> National Center for Supercomputing Applications
> University of Illinois - UC
> 217-649-0747
>
> "If you're clear in your vision and trust the people in your team with
> clear objectives, they will invariably do their best to achieve everything
> desired, and usually deliver everything you could have hoped for and even
> more." -Paul Debevec
>
More information about the ag-dev
mailing list