TypeError super(type, obj): obj must be an instance or subtype of type