Typeerror With 'module' Object Is Not Callable
I have a test folder the structure within the folder __init.py__ aa.py test.py for aa.py class aa: def __init__(self,max): self.max=max print max+1 def he
Solution 1:
You have a module aa
, and in that module you have a class aa
. You only import the module.
Either do:
importaaabc= aa.aa(100)
or:
from aa importaaabc= aa(100)
or, even better, use separate names for module and class.
Solution 2:
Use from aa import *
instead of import aa
in your test.py
script.
Solution 3:
you need to do like this.
from aa importaaabc= aa(100)
abc.hello()
Post a Comment for "Typeerror With 'module' Object Is Not Callable"