1

I keep getting this error. TypeError: 'str' object is not callable

I searched all my code and I don't even use the word str anywhere.

if again():
        print ('%s LAST: %s') % (k, tx)
        m = 1
        k = 0.001
        amount = k / 0.00000001
        amount = int(amount)
        print ('Doing %s k') % k
        do(amount, int(m))   # The error occurs here
else:
     #code

1 Answer 1

5

You assigned a string to do somewhere.

You'll need to search your code to see where you do that, or rename the do() function to something else to resolve the conflict.

Sign up to request clarification or add additional context in comments.

8 Comments

Could be to int but highly unlikely giving the presence of int(amount) two lines up.
@LasseV.Karlsen: No, because the error happens on the do() line, not 2 lines earlier where int() is also used.
In my world I take nothing for granted, could be multithreaded :) but I agree, this is do.
@LasseV.Karlsen: Exactly, it's not as if the use of int() is conditional there.
@LasseV.Karlsen: In the world of Python beginners of Stack Overflow, most don't use threading. :-)
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.