TypeError: 'module object is not callable'

Diez B. Roggisch deets at nospam.web.de
Mon Sep 3 13:23:50 CEST 2007

 christophertidy at hotmail.com wrote:

> Thank you for your help that seems to have done the trick.
> You are correct Diez B. Roggisch that I come from a java background!
> I have a new tiny problem I can't understand either.
> Withing Step.py I have the following method
> def isCompleted(self):
>     "Check whether data step has been processed"
>     return self.isCompleted
> Then within main.py I simply wish to print the value of isCompleted
> which I try to do by the following
> print 'Magn completed status is',a.isCompleted()
> Which returns the following error:
>     a.isCompleted()
> TypeError: 'int' object is not callable
> I have tried ideas such as int(a.isCompleted) but to no prevail. Any
> ideas?

Without more code, not really. It seems as if a is an integer, and not an
instance of Step.


More information about the Python-list mailing list