Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'args': 0.07; 'python?': 0.07; 'from:addr:python': 0.09; 'wrote:': 0.14; '"@"': 0.16; '164': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:name:mrab': 0.16; 'inserting': 0.16; 'message- id:@mrabarnett.plus.com': 0.16; 'none"': 0.16; 'received:84.92': 0.16; 'received:84.92.122': 0.16; 'received:84.92.122.60': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'reply-to:addr :python-list': 0.16; 'subject:iterable': 0.16; 'subject:required': 0.16; 'argument': 0.16; 'charset:iso-8859-7': 0.16; 'meant': 0.18; 'please?': 0.19; 'code': 0.22; 'header:In-Reply-To:1': 0.22; 'insert': 0.22; 'version': 0.25; 'received:84': 0.25; 'error': 0.29; 'be.': 0.29; 'comment': 0.30; 'none,': 0.31; 'typeerror:': 0.31; "can't": 0.31; 'to:addr:python-list': 0.32; 'lines': 0.34; 'header:User-Agent:1': 0.35; 'reply-to:addr:python.org': 0.35; 'try:': 0.35; 'hello,': 0.36; 'getting': 0.36; 'none': 0.36; 'skip:* 60': 0.38; 'database': 0.38; 'help': 0.39; 'comments': 0.39; 'to:addr:python.org': 0.39; 'reply-to:no real name:2**0': 0.72; 'header:Reply-To:1': 0.72; 'guest': 0.73; '166': 0.84; '8bit%:54': 0.84 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqAGABlTl01UXebj/2dsb2JhbACYZYx+d79xhWsEkH4 Date: Sat, 02 Apr 2011 17:50:39 +0100 From: MRAB User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: python-list@python.org Subject: Re: TypeError: iterable argument required References: <3902dc1f-90bb-4602-9938-402a3582aa84@v31g2000vbs.googlegroups.com> In-Reply-To: <3902dc1f-90bb-4602-9938-402a3582aa84@v31g2000vbs.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-7; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: python-list@python.org List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 27 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1301763047 news.xs4all.nl 81481 [::ffff:82.94.164.166]:35720 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:2462 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.