Seems like self.ptype is a type that has __init__ with no arguments (other than self). You can add "print type(self.ptype)" as first line of "convert" to see what type it is (or place a breakpoint there).