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
foobarasfubar, etc)?foobaris not a method defined insideblahblah. Since you assert that it is defined as such, you should not be seeing this error. Are you sure thatfoobaris defined insideblahblahin your real code?blahblahtwice? Once withfoobardefined, and once without? (i.e. overriding your previous definition)dir(mod1.blahblah)(isfoobarthere?),dir(obj1)(isfoobarthere?),obj1.__class__(is itmod1.blahblah?),obj1.__module__(is itmod1?, etc.