I am creating a method in a class in a module mod1 and calling it as follows:
class blahblah:
def foobar(self, bvar, **dvar)
////
return dvar
And calling it as:
obj1 = mod1.blahblah()
dvar1 = obj1.foobar(True, **somedictionary)
It throws a Attribute error: blahblah has no attribute named foobar
Could you please help me with it? Thanks in advance
foobar
asfubar
, etc)? – Morulafoobar
is not a method defined insideblahblah
. Since you assert that it is defined as such, you should not be seeing this error. Are you sure thatfoobar
is defined insideblahblah
in your real code? – Morulablahblah
twice? Once withfoobar
defined, and once without? (i.e. overriding your previous definition) – Hamfurddir(mod1.blahblah)
(isfoobar
there?),dir(obj1)
(isfoobar
there?),obj1.__class__
(is itmod1.blahblah
?),obj1.__module__
(is itmod1
?, etc. – Downe