getPos a float is require

I’m trying to do self.avatar.getPos(), but it gives TypeError: a float is required, which is ver strange for me!
I don’t know if it helps, but this model is reparented several times, including to dummy nodepaths (but its children of render when getPos is called)

Could you show some more code? getPos() is certainly not supposed to give you an error, but we can’t really help you unless we get some more context.

Nevermind, I found the problem.

I wrote a function to print the output of a function and was using with getPos, but the problem is that I called it “log”, but it hadn’t overwritten the original one (I don’t know why), which requires a float. :blush:

def log(a):print a()
base.accept("space",log,[self.avatar.getPos]) #inside the Class