Error:Python:type exceptions.TypeError

From IPRE Wiki
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