Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'yet.': 0.04; 'error:': 0.07; 'failing': 0.07; 'cc:addr:python-list': 0.11; '"every': 0.16; 'enough.': 0.16; 'fails.': 0.16; 'quoted': 0.16; 'respond.': 0.16; 'select.': 0.16; 'subject:fails': 0.16; 'subject:when': 0.16; 'traceback.': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'code.': 0.18; '>>>': 0.22; 'select': 0.22; 'example': 0.22; 'saying': 0.22; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'shown': 0.26; 'this:': 0.26; 'post': 0.26; 'header:In-Reply-To:1': 0.27; 'record': 0.27; 'host': 0.29; 'chris': 0.29; 'am,': 0.29; 'statement': 0.30; 'along': 0.30; 'code': 0.31; 'produces': 0.31; 'quotes': 0.31; 'figure': 0.32; 'actual': 0.34; "can't": 0.35; 'but': 0.35; 'received:google.com': 0.35; 'are,': 0.36; 'help,': 0.39; 'enough': 0.39; 'even': 0.60; "you've": 0.63; 'show': 0.63; 'more': 0.64; 'chance': 0.65; 'to:addr:gmail.com': 0.65; 'subject': 0.69; 'containing': 0.69; '8bit%:92': 0.71; '8bit%:100': 0.72; 'subject:get': 0.81; 'visitor': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=CmIz2BpeMAfqwssH0IXxKjuO6pAQABrboied7wcOoYk=; b=GN8VPwevb4NYu/KIwhRIdQI9lM5PgGQkWfb+xH5txLtikPwRt8SNRcnV74CpeBYDiZ xJ4Uj0Q1v4jFMqEukzvyVO9/445u2f6hCrvF/vBTsSitlzv2UXgsTW4N1AK4u4WtLijz DcEXPLxYRPXNb3MRt2zyvhmBDZJAbrKWHv3X6onit8ah/u2zHOHMb6nQ0I9Yc5Awsdja czBYEQrAVB8qgUQIszEKUL119jshkN/Y9wcoLizbghmSNc8b161wYQMB3z/6ergoI+iY S07eIGgPa/ILAly1n+eRiykXzCQMc/m7HaE1NN/O5FZYh5qKTft3961QUjenRK7BRn0Q MdWA== X-Received: by 10.224.160.83 with SMTP id m19mr1563967qax.108.1380984232648; Sat, 05 Oct 2013 07:43:52 -0700 (PDT) Sender: Ned Batchelder Date: Sat, 05 Oct 2013 10:43:51 -0400 From: Ned Batchelder User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: =?UTF-8?B?zp3Or866zr/PgiDOkc67zrXOvs+Mz4DOv8+FzrvOv8+C?= Subject: Re: Select fails when cookie tried to get a numeric value References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list 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: 39 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1380984241 news.xs4all.nl 15934 [2001:888:2000:d::a6]:34009 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:56191 On 10/5/13 10:30 AM, Νίκος Αλεξόπουλος wrote: > Στις 5/10/2013 5:28 μμ, ο/η Chris Angelico έγραψε: >> On Sun, Oct 6, 2013 at 12:24 AM, Νίκος Αλεξόπουλος >> wrote: >>> But i have given you the line that produces the error: >> >> The statement you quoted is an INSERT. The traceback quotes a SELECT. >> These are not the same line of code. You still have not shown us the >> actual line from the traceback. >> >> ChrisA >> > Every mysql statemtns that involved cookieID fails. > > in this example this: > > # find the visitor record for the (saved) cID and current host > cur.execute('''SELECT * FROM visitors WHERE counterID = %s and > cookieID = %s''', (cID, cookieID) ) > data = cur.fetchone() #cookieID is unique > Nikos, slow down. Don't post three emails before someone has a chance to respond. To get help, you have to show the code that goes along with the traceback. Your subject line even says, "select fails", so you know it is a select statement in the traceback. You have to show us *that code*, and more than one line. You've shown the line here, but we don't know what cID and cookieID are, so we can't help yet. Saying "every mysql statement that involves cookieID fails" isn't enough. Show us the code containing the line that actually is failing in that traceback. Include enough of the code that we can figure out what is going on. You've said that you can do better here. Please try to. --Ned.