Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.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.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'error:': 0.07; 'to:addr:comp.lang.python': 0.09; 'try:': 0.09; 'cc:addr:python- list': 0.11; 'better:': 0.16; 'hits': 0.16; 'seems': 0.21; 'cc:addr:gmail.com': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'cc:2**1': 0.23; 'header:User-Agent:1': 0.23; 'header:In- Reply-To:1': 0.27; 'statement': 0.30; 'received:209.85': 0.35; 'except': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'received:209': 0.37; 'even': 0.60; 'subject:. ': 0.67 X-Received: by 10.49.72.225 with SMTP id g1mr1040124qev.36.1364412192048; Wed, 27 Mar 2013 12:23:12 -0700 (PDT) Newsgroups: comp.lang.python Date: Wed, 27 Mar 2013 12:23:11 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=94.68.83.207; posting-account=DYJQ-woAAACEPH85Au2BhUVfFTfSfVa4 References: <9c01c631-77e8-4104-ae1f-5cccfaaea10d@googlegroups.com> <22f50ec2-7d20-47af-a793-5cf801b6a23e@googlegroups.com> <8ada8de4-1cb2-4fbb-ae4f-8c0d47c1cf40@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: =?ISO-8859-7?B?zd/q7/Igw+rxMzPq?= To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Cc: =?ISO-8859-7?B?zd/q7/Igw+rxMzPq?= , "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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1364412937 news.xs4all.nl 6951 [2001:888:2000:d::a6]:56649 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42033 Even better: try: sql = '''SELECT hits FROM counters WHERE url = %s''' % page print( sql ) cur.execute( sql ) data = cur.fetchone() except MySQLdb.ProgrammingError as e: print ( "Query Error: ", dir( sys.exc_info()[1] ) ) ======== sql statement seems okey...