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


Groups > comp.lang.python > #2462

Re: TypeError: iterable argument required

Date 2011-04-02 17:50 +0100
From MRAB <python@mrabarnett.plus.com>
Subject Re: TypeError: iterable argument required
References <3902dc1f-90bb-4602-9938-402a3582aa84@v31g2000vbs.googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.130.1301763047.2990.python-list@python.org> (permalink)

Show all headers | View raw


On 02/04/2011 17:26, Νικόλαος Κούρας wrote:
> Hello, after inserting this line if "@" in mail and comment not in
> ("Σχολιάστε ή ρωτήστε με σχετικά....", ""):
>
> iam getting the following error which i dont understand
>
> **************************************************************
> 163         # insert guest comments into database if form was
> submitted
>    164         if "@" in mail and comment not in ("Σχολιάστε ή ρωτήστε
> με σχετικά....", ""):
>    165                 try:
>    166                         cursor.execute( '''INSERT INTO
> users(mail, comment) VALUES(%s, %s)''', (mail, comment) )
> mail = None, comment = None
>
> TypeError: iterable argument required
>        args = ('iterable argument required',)
> **************************************************************
>
> can you help please?

Which version of Python?

Can you please paste those few lines of code (say, lines 163 to 170).

I can't see what the "mail = None, comment = None" is meant to be.

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


Thread

TypeError: iterable argument required Νικόλαος Κούρας <nikos.kouras@gmail.com> - 2011-04-02 09:26 -0700
  Re: TypeError: iterable argument required MRAB <python@mrabarnett.plus.com> - 2011-04-02 17:50 +0100
    Re: TypeError: iterable argument required Νικόλαος Κούρας <nikos.kouras@gmail.com> - 2011-04-02 14:02 -0700
  Re: TypeError: iterable argument required Chris Angelico <rosuav@gmail.com> - 2011-04-03 05:31 +1000

csiph-web