An error when i switched from python v2.6.6 => v3.2.3
Νίκος Γκρ33κ
nikos.gr33k at gmail.com
Thu Mar 7 09:44:49 EST 2013
Τη Πέμπτη, 7 Μαρτίου 2013 4:37:31 μ.μ. UTC+2, ο χρήστης Chris Angelico έγραψε:
> On Fri, Mar 8, 2013 at 1:34 AM, Νίκος Γκρ33κ <nikos.gr33k at gmail.com> wrote:
>
> > os.system( 'python metrites.py > %s' ) % htmltemp
>
> >
>
> > <type 'exceptions.TypeError'>: unsupported operand type(s) for %: 'int' and 'str'
>
>
>
> Simple parenthesis problem. Take a careful look at the line mentioned
>
> in the exception traceback (which you didn't share with us, but
>
> fortunately the error's pretty obvious) and see if you can find the
>
> problem.
> Hint: htmltemp is the str mentioned in the error.
/home/nikos/public_html/cgi-bin/metrites.py in ()
220 htmldata = f.read()
221 elif htmlpage.endswith('.py'):
222 os.system( 'python metrites.py > %s' ) % htmltemp
223 f = open( htmltemp )
224 htmldata = f.read()
os = <module 'os' from '/usr/lib64/python2.6/os.pyc'>, os.system = <built-in function system>, htmltemp = '/home/nikos/www/data/private/htmltemp'
<type 'exceptions.TypeError'>: unsupported operand type(s) for %: 'int' and 'str'
args = ("unsupported operand type(s) for %: 'int' and 'str'",)
message = "unsupported operand type(s) for %: 'int' and 'str'"
Τhis is the complete traceback iam reading it and reading it all over but i just dont *see* what it tries to tell me.
More information about the Python-list
mailing list