Argument count mismatch

Chris Angelico rosuav at gmail.com
Thu Apr 21 22:15:44 CEST 2011


On Fri, Apr 22, 2011 at 5:33 AM, RVince <rvince99 at gmail.com> wrote:
> I am getting the following:
>
> Error - <type 'exceptions.TypeError'>: cmseditorlinemethod() takes
> exactly 2 arguments (1 given)
>
> When I make the following call:
>
> http://localhost/eligibility/cmseditorlinemethod/474724434
>
> Which invokes:
>
> def cmseditorlinemethod(self, ssn):

You're doing an HTTP request that ultimately is supposed to translate
into a method call. The problem appears to be somewhere in between
those; what system are you using to handle HTTP (web) requests, and
how does it translate a URL into a method call?

As a side point, if it takes a piece of the URL and looks it up,
unchecked, as a member name, this is a rather dodgy practice. I hope
you have a whitelist of legal method names.

Chris Angelico



More information about the Python-list mailing list