Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed4.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.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'mrab': 0.05; 'output': 0.05; 'string': 0.09; 'received:209.85.219': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.11; "'%s':": 0.16; 'hits': 0.16; 'placeholder': 0.16; 'sys.exit(0)': 0.16; 'try?': 0.16; 'wrote:': 0.18; 'not,': 0.20; 'cc:addr:python.org': 0.22; 'print': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; 'now?': 0.24; 'tells': 0.24; 'visible': 0.24; 'file.': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'suggested': 0.26; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'statement': 0.30; 'code': 0.31; 'easier': 0.31; 'run': 0.32; 'maybe': 0.34; 'problem': 0.35; 'received:209.85': 0.35; 'but': 0.35; 'received:google.com': 0.35; '2.6': 0.36; 'subject:?': 0.36; 'received:209': 0.37; 'anything': 0.39; 'commands': 0.60; 'from:no real name:2**0': 0.61; "you'll": 0.62; 'email addr:yahoo.com': 0.64; 'subject:. ': 0.67; 'webpage': 0.68; '8bit%:92': 0.71; '8bit%:100': 0.72; '2013': 0.98 X-Received: by 10.49.3.129 with SMTP id c1mr1495306qec.40.1364408103273; Wed, 27 Mar 2013 11:15:03 -0700 (PDT) Newsgroups: comp.lang.python Date: Wed, 27 Mar 2013 11:15:03 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=94.68.83.207; posting-account=hGu1uQoAAACZy7LiR653nG0NwqDrTyoS References: <9c01c631-77e8-4104-ae1f-5cccfaaea10d@googlegroups.com> <22f50ec2-7d20-47af-a793-5cf801b6a23e@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 94.68.83.207 MIME-Version: 1.0 Subject: Re: MySQLdbd error. Perhpas it isn't installed? From: nagia.retsina@gmail.com To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: , Message-ID: Lines: 63 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1364408107 news.xs4all.nl 6909 [2001:888:2000:d::a6]:41726 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42023 =CE=A4=CE=B7 =CE=A4=CE=B5=CF=84=CE=AC=CF=81=CF=84=CE=B7, 27 =CE=9C=CE=B1=CF= =81=CF=84=CE=AF=CE=BF=CF=85 2013 6:48:44 =CE=BC.=CE=BC. UTC+2, =CE=BF =CF= =87=CF=81=CE=AE=CF=83=CF=84=CE=B7=CF=82 MRAB =CE=AD=CE=B3=CF=81=CE=B1=CF=88= =CE=B5: > On 27/03/2013 06:42, =CE=9D=CE=AF=CE=BA=CE=BF=CF=82 =CE=93=CE=BA=CF=8133= =CE=BA wrote: >=20 > > =CE=A4=CE=B7 =CE=A4=CE=B5=CF=84=CE=AC=CF=81=CF=84=CE=B7, 27 =CE=9C=CE= =B1=CF=81=CF=84=CE=AF=CE=BF=CF=85 2013 6:26:06 =CF=80.=CE=BC. UTC+2, =CE=BF= =CF=87=CF=81=CE=AE=CF=83=CF=84=CE=B7=CF=82 ru...@yahoo.com =CE=AD=CE=B3=CF= =81=CE=B1=CF=88=CE=B5: >=20 > > >=20 > >> If not, maybe you can try adding a print statement to your code that >=20 > >> will print the value of 'page'. This will be easier to do if you >=20 > >> can run you code interactively. If you have to run it via a webserver >=20 > >> than maybe you'll need wrap the print output in html commands to make >=20 > >> it visible on the page, or to write it to a file. >=20 > > >=20 > > >=20 > > I tried what you suggested by doign the following: >=20 > > >=20 > > print( page ) >=20 > > sys.exit(0) >=20 > > cur.execute( '''SELECT hits FROM counters WHERE url =3D %s''', (page,) = ) >=20 > > >=20 > > >=20 > > and the result is printed in the webpage as 'index.html' >=20 > > >=20 > > so page seem s to be a string but the error is still persistant. >=20 > > Anything else i need to try? >=20 > > >=20 > A brief look at the documentation tells me that MySQL uses '?' as the >=20 > placeholder instead of '%s': >=20 >=20 >=20 > cur.execute('''SELECT hits FROM counters WHERE url =3D ?''', (page, )) But as i have it used to work withour problem with pyhton 2.6 Why would it be a problem now?