Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypeError: int is not callable [duplicate]

So I did my research but I still cant figure out why Im getting this error:

TypeError: int is not callable

Heres my code:

count = []
for row in Matrix:
     count.append(row[0][0].Value)

results = map(int, count)    

print max(results)

count list contained a list of string ints, I converted these to pure ints and then I wanted to find the max number but I get the error.

what am I not seeing here?

btw, print min(count) works fine....

like image 729
Boosted_d16 Avatar asked Sep 17 '13 15:09

Boosted_d16


1 Answers

You're trying to use a number as a function somewhere.

Earlier in your program, did you do something like map = 6 or max = 6? If so, you overrode either the map or max function(s), making them unusable.

To fix this, change the names of the variable names so they no longer overwrite the builtins.

like image 152
Michael0x2a Avatar answered Nov 13 '22 12:11

Michael0x2a