TypeError: 'module' object is not callable
ppv.grps at gmail.com
Fri Aug 12 00:43:06 CEST 2011
I wrote a class, Univariate, that resides in a directory that is in my PYTHONPATH. I'm able to import that class into a *.py file. However when I try to instantiate an object with that class like:
x = Univariate(a) # a is a list that is expected by the Univariate class
python raises the TypeError: 'module' object is not callable. If I embed the code of the Univariate class in my *.py file, there is no problem. Also, when the class is imported and I do a
it does not print all the methods that are in the class, while if the class code appears in my *.py file, all the methods are available and a list with the correct methods are printed.
Thanks in advance.
FreeBSD 7.2 machine with python version 2.5.6
More information about the Python-list