• Register
Welcome to Kodlogs, programming questions and answer website.
0 votes
typeerror: 'module' object is not callable
by (1.6k points)  
reshown by

1 Answer

0 votes

typeerror: 'module' object is not callable

we are going to check what

is this type error more you loved it is

not callable so let me go to a Python

console here I am going to import the

inbuilt built-in noise module so let me

check what they are the methods defined

in this voice module so these are the

methods and attributes of voice module

so let me invoke this or iOS module like

this we can see there type of moral

abilities not callable this is because

this mod is module does not have the

Gowda method double underscore called so

we can't invoke a more you like this so

even if we try to add that double

underscore call method in this module we

cannot invoke this module let me try

this let me define a function like this

then add this function to oils module

like core equal to one one now if you

check the func methods and attributes of

this module you can see that see the

double on the so called double

underscore method but after that if you

try to invoke this module like this

again you will get the same because this

is the reason if if they have that

wonderful call method they are the

instance of more you'll type and a call

matter is looked up under their type not

instance itself so the more you'll not

be in callable even they they have the

bundle so call in

by (9.8k points)