X-Received: by 10.224.17.140 with SMTP id s12mr26942101qaa.3.1362659158613; Thu, 07 Mar 2013 04:25:58 -0800 (PST) X-Received: by 10.49.29.99 with SMTP id j3mr903163qeh.38.1362659158561; Thu, 07 Mar 2013 04:25:58 -0800 (PST) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!dd2no7972505qab.0!news-out.google.com!p7ni379qai.0!nntp.google.com!t2no9771139qal.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.python Date: Thu, 7 Mar 2013 04:25:58 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=94.68.107.188; posting-account=DYJQ-woAAACEPH85Au2BhUVfFTfSfVa4 NNTP-Posting-Host: 94.68.107.188 References: <8e17232e-5b24-4040-9215-c4bd89f34fa2@googlegroups.com> <7bfe7117-d39d-48dc-9a6f-3d57484610a8@googlegroups.com> <213cf076-4163-44fd-a8b6-b25970da1bfa@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <8a2af358-542c-45d3-b334-b4cb8f7cb7cf@googlegroups.com> Subject: Re: An error when i switched from python v2.6.6 => v3.2.3 From: =?ISO-8859-7?B?zd/q7/Igw+rxMzPq?= Cc: python-list@python.org Injection-Date: Thu, 07 Mar 2013 12:25:58 +0000 Content-Type: text/plain; charset=ISO-8859-7 Content-Transfer-Encoding: quoted-printable Xref: csiph.com comp.lang.python:40757 =D4=E7 =D0=DD=EC=F0=F4=E7, 7 =CC=E1=F1=F4=DF=EF=F5 2013 1:51:42 =EC.=EC. UT= C+2, =EF =F7=F1=DE=F3=F4=E7=F2 Michael Ross =DD=E3=F1=E1=F8=E5: > On Thu, 07 Mar 2013 12:27:03 +0100, =CD=DF=EA=EF=F2 =C3=EA=F133=EA =20 >=20 > wrote: >=20 >=20 >=20 > > =D4=E7 =D0=DD=EC=F0=F4=E7, 7 =CC=E1=F1=F4=DF=EF=F5 2013 11:06:27 =F0.= =EC. UTC+2, =EF =F7=F1=DE=F3=F4=E7=F2 =CD=DF=EA=EF=F2 =C3=EA=F133=EA =20 >=20 > > =DD=E3=F1=E1=F8=E5: >=20 > >> Any ideas about the error please? >=20 > >> >=20 > >> >=20 > >> >=20 > >> I can assure you all the statemnt are correct ebcause they work in =20 >=20 > >> python v2.6.6 >=20 > > >=20 > > can someone help this issue so my webiste will get back on working plz? >=20 >=20 >=20 > MySQLdb is python 2 only. >=20 > "MySQL-3.23 through 5.0 and Python-2.3 through 2.7 are currently =20 >=20 > supported. Python-3.0 will be supported in a future release." >=20 >=20 >=20 > Maybe try this one: >=20 > https://pypi.python.org/pypi/mysql-connector-python/1.0.9 >=20 >=20 >=20 > Alternatively, >=20 > forget about subprocess.check_output, >=20 > call your metrites.py with os.system('python metrites.py some-temp-file') >=20 > and have it write its output to some-temp-file, >=20 > and read some-temp-file back into your template? Yes its better for me to give upon python3 for the moment being, because al= l that hassle was for makeing the subprocess command run. Now i just followed your advice and tried: elif htmlpage.endswith('.py'): htmldata =3D os.system('/usr/bin/python ./metrites.py /data/files/htmltem= p') but produced error tells me that: template undefined, htmldata =3D -1, counter =3D '
...st.gr/?show=3Dstats"> 0 \n\t\t ' whay htmldata reeturn the value '-1' when os.sytem is executed?