Error:Python:type exceptions.TypeError

From IPRE Wiki
Revision as of 21:14, 21 March 2011 by Doug Blank (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Cause

This error occurred because you used a value of the wrong type.

Solution

Make sure that are using a value of the appropriate type.

Consider this code:

1 + "this is a string"

You cannot concatenate an int and a string. You must turn both into numbers, or into strings:

"1" + "this is a string"
1 + 7