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


Groups > comp.lang.python > #3821

Re: Argument count mismatch

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.031
X-Spam-Evidence '*H*': 0.94; '*S*': 0.00; 'arguments': 0.05; 'names.': 0.07; 'somewhere': 0.11; 'def': 0.13; 'am,': 0.14; 'wrote:': 0.14; 'call:': 0.16; 'call?': 0.16; 'call.': 0.19; 'header:In-Reply-To:1': 0.22; 'appears': 0.24; 'point,': 0.25; 'chris': 0.27; 'message-id:@mail.gmail.com': 0.28; 'looks': 0.28; 'error': 0.29; 'problem': 0.29; 'fri,': 0.29; 'does': 0.31; 'supposed': 0.31; 'to:addr:python-list': 0.32; 'using': 0.34; 'doing': 0.36; 'rather': 0.36; 'getting': 0.36; 'received:209.85': 0.37; 'exactly': 0.37; 'apr': 0.38; 'http': 0.38; 'received:google.com': 0.38; 'to:addr:python.org': 0.39; 'received:209': 0.39; 'how': 0.39; 'takes': 0.40; 'header:Received:5': 0.40; '2011': 0.62; 'piece': 0.63; 'legal': 0.64; 'received:209.85.210.174': 0.84; 'received:mail- iy0-f174.google.com': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=C6fBy/SHFd0vdiS5CRiMaSb6vLA1N//q05KF3Z7+htE=; b=a7f0zEwZGJrWNw5o2Fmvsot2iaRmEwZgr+BmpSTlR8eIGw9dgHs6iGo/Ea7d7YhQ4+ qj8/+I9d0FpcmGrhxEO/WpPTnq7H7axrJG31l7DXpXaN873CP3iMpDNAkEwriYpkrJTQ MKVeEgvxEpcNSMYDN/iq4mukIEfd4jSUNKL2k=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=K5ATHXsuWXWcFgHYWki0nl0qfMiPF2DNksrvFo/uYpQNp+NeO0+xJi5fOVMPtqfz6G LKdLellwRkDqPRblp5VEdi1rBhzpUMhEHdIGl0i5tKmQHrqVk8XtN5Yy657NO1EIC5Vg AUa8gKeLg1PcJ6HvTctXWcr8BOmC6lCBmJWkw=
MIME-Version 1.0
In-Reply-To <ac20c08e-6957-4836-9319-e668a8da8112@q30g2000vbs.googlegroups.com>
References <ac20c08e-6957-4836-9319-e668a8da8112@q30g2000vbs.googlegroups.com>
Date Fri, 22 Apr 2011 06:15:44 +1000
Subject Re: Argument count mismatch
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.719.1303416946.9059.python-list@python.org> (permalink)
Lines 24
NNTP-Posting-Host 82.94.164.166
X-Trace 1303416946 news.xs4all.nl 41103 [::ffff:82.94.164.166]:55867
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:3821

Show key headers only | 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