tags:

views:

126

answers:

1

I'm getting strange error "'int' object has no attribute 'startswith'"

I haven't used the word "startswith" in my python program. ? Does any one how to fix this -- or what it refers to ?

+5  A: 

Something in your program is trying to call the startswith method of an object, probably because it expects it to be a string. You'll have to pay attention to the traceback to see what it is being called on, and why that is an integer instead of a string. Did you pass along an integer where a string was expected?

Thomas Wouters
how to find which lines causes this errors? Any way to execute python in debug mode
lakshmipathi
@lakshmipathi: Like the answer says, look at the traceback.
Ignacio Vazquez-Abrams
yes..i'm using git and found it ..it's with join() which tries to use int and string. using str(id) works ..thanks
lakshmipathi