Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!newsfeed.xs4all.nl!newsfeed2.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'causing': 0.04; 'elif': 0.05; 'output': 0.05; 'subject:Python': 0.06; 'args': 0.07; 'attribute': 0.07; 'exit': 0.09; 'template': 0.14; "'localhost',": 0.16; '(1,': 0.16; '10:45': 0.16; '586': 0.16; 'charset': 0.16; 'cmd': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'retcode': 0.16; 'returncode': 0.16; 'script,': 0.16; 'subject:issue': 0.16; 'template,': 0.16; 'wrote:': 0.18; 'hey': 0.18; 'trying': 0.19; 'basically': 0.19; "skip:' 30": 0.19; 'working.': 0.19; '(the': 0.22; 'command': 0.22; 'header:User- Agent:1': 0.23; 'error': 0.23; 'least': 0.26; 'header:In-Reply- To:1': 0.27; 'host': 0.29; 'am,': 0.29; 'raise': 0.29; 'returned': 0.30; 'code': 0.31; "skip:' 10": 0.31; 'produces': 0.31; "skip:' 40": 0.31; 'file': 0.32; 'there.': 0.32; 'run': 0.32; 'not.': 0.33; 'problem': 0.35; 'subject: (': 0.35; 'knows': 0.35; 'problem.': 0.35; 'test': 0.35; 'there': 0.35; 'error.': 0.37; 'message-id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'itself': 0.39; 'to:addr:python.org': 0.39; 'skip:p 20': 0.39; 'received:org': 0.40; 'subject: ': 0.61; 'telling': 0.64; 'fact,': 0.69; 'text/html;': 0.84 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Tue, 28 May 2013 11:17:05 -0600 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20130105 Thunderbird/10.0.12 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Encodign issue in Python 3.3.1 (once again) References: <7823093c-2c07-4fa0-ae97-960c62f8ff9d@googlegroups.com> <69f5q8hkra42rvpfmbng4f0airgikqf5js@4ax.com> <9560d43f-8100-4914-9a71-c30ab479ec35@googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: 45 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1369761431 news.xs4all.nl 15978 [2001:888:2000:d::a6]:57052 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:46312 On 05/28/2013 10:45 AM, Νίκος Γκρ33κ wrote: > con = pymysql.connect( db = 'pelatologio', host = 'localhost', user = 'blabla', passwd = 'blabla', init_command='SET NAMES UTF8', charset = 'utf-8' ) > > produces this "God knows what" error traceback.... Hey at least your database code is now working. > /home/nikos/public_html/cgi-bin/metrites.py in () > 217 template = htmldata + counter > 218 elif page.endswith('.py'): > => 219 htmldata = subprocess.check_output( '/home/nikos/public_html/cgi-bin/' + page ) > 220 template = htmldata.decode('utf-8').replace( 'Content-type: text/html; charset=utf-8', '' ) + counter > 221 > htmldata undefined, subprocess = , subprocess.check_output = , page = 'pelatologio.py' > /opt/python3/lib/python3.3/subprocess.py in check_output(timeout=None, *popenargs=('/home/nikos/public_html/cgi-bin/pelatologio.py',), **kwargs={}) > 584 retcode = process.poll() > 585 if retcode: > => 586 raise CalledProcessError(retcode, process.args, output=output) > 587 return output > 588 > global CalledProcessError = , retcode = 1, process = , process.args = '/home/nikos/public_html/cgi-bin/pelatologio.py', output = b'\n\n' > CalledProcessError: Command '/home/nikos/public_html/cgi-bin/pelatologio.py' returned non-zero exit status 1 > args = (1, '/home/nikos/public_html/cgi-bin/pelatologio.py') > cmd = '/home/nikos/public_html/cgi-bin/pelatologio.py' > output = b'\n\n' > returncode = 1 > with_traceback = Again the traceback is telling you where to look for the problem. And the problem is in your own script, pelatologio.py, though the line number that's causing the problem is obscured. Basically you want pelatologio.py to run and then you process the output through a template, correct? Well the traceback is telling you that pelatologio.py is erroring out. In fact, subprocess is telling you that this process (your script) quit with an error. Though the line number in pelatologio.py is unknown (the traceback is obscured by your html processing code in your template processor), the error message itself is not. Inside pelatologio.py there is some object that you are trying to reference the "id" attribute on it does not contain id. So the problem is in pelatologio.py. Double check your code there. Try to make a standalone test file you can run locally.