TypeError: 'module' object is not callable
John Gordon
gordon at panix.com
Thu Aug 11 19:39:21 EDT 2011
In <b5d26e9e-df36-4721-bf1b-d5b60b816fb0 at glegroupsg2000goo.googlegroups.com> Forafo San <ppv.grps at gmail.com> writes:
> 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's difficult to diagnose this problem when you haven't shown us the
code for Univariate.
--
John Gordon A is for Amy, who fell down the stairs
gordon at panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"
More information about the Python-list
mailing list