Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #3821

Re: Argument count mismatch

References <ac20c08e-6957-4836-9319-e668a8da8112@q30g2000vbs.googlegroups.com>
Date 2011-04-22 06:15 +1000
Subject Re: Argument count mismatch
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.719.1303416946.9059.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Apr 22, 2011 at 5:33 AM, RVince <rvince99@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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Argument count mismatch RVince <rvince99@gmail.com> - 2011-04-21 12:33 -0700
  Re: Argument count mismatch Wolfgang Rohdewald <wolfgang@rohdewald.de> - 2011-04-21 21:43 +0200
  Re: Argument count mismatch Chris Angelico <rosuav@gmail.com> - 2011-04-22 06:15 +1000
  Re: Argument count mismatch John Gordon <gordon@panix.com> - 2011-04-21 20:33 +0000
  Re: Argument count mismatch Westley Martínez <anikom15@gmail.com> - 2011-04-21 15:41 -0700
  Re: Argument count mismatch Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-04-22 01:43 +0000
    Re: Argument count mismatch Daniel Kluev <dan.kluev@gmail.com> - 2011-04-22 21:19 +1100

csiph-web