Encodign issue in Python 3.3.1 (once again)
Νίκος Γκρ33κ
support at superhost.gr
Tue May 28 12:45:24 EDT 2013
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....
/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 = <module 'subprocess' from '/opt/python3/lib/python3.3/subprocess.py'>, subprocess.check_output = <function 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 = <class 'subprocess.CalledProcessError'>, retcode = 1, process = <subprocess.Popen object>, process.args = '/home/nikos/public_html/cgi-bin/pelatologio.py', output = b'<!--: spam\nContent-Type: text/html\n\n<body b...Type\' object has no attribute \'id\'\n\n-->\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'<!--: spam\nContent-Type: text/html\n\n<body b...Type\' object has no attribute \'id\'\n\n-->\n\n'
returncode = 1
with_traceback = <built-in method with_traceback of CalledProcessError object>
More information about the Python-list
mailing list