[Tutor] Error: 'module' object is not callable
Alan Gauld
alan.gauld at btinternet.com
Wed Nov 14 00:19:05 CET 2007
"Ajaya Mohan R. S." <ajayan_rs at yahoo.com> wrote
> I am trying to run a code for plotting Taylor diagram,
> ending up with the following errors. How do I fix
> these errors? Help appreciated.
Without any sight of the code that caused them its hard
to give sensible answers. We can only suggest general
options:
> Error: 'module' object is not callable
Suggests that you are trying to call a module!
Do you have a pair of parens after a module name
(or a reference to a module name) For example
import foo
# do some stuff
bar = foo
# more stuff
bar() # error here coz bar refers to module foo
> Traceback (most recent call last):
> File "model_vs_data_comp_stat.py", line 1471, in ?
> normalize_sign_option=normalize_sign_option,
> scaling_factor=scaling_factor)
This looks like the end of a function/method call but
we can't see the beginning...
> File "model_vs_data_comp_stat.py", line 1197, in
> model_vs_data_comp_stat
> all_model_output = MV.sort (all_model_output, 0)
> ValueError: sort axis argument out of bounds
So where is the axis value derived?
Other than that I doubt we can help without visibility
of some code.
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld
More information about the Tutor
mailing list