try to add str as variant type to solve the problem in __getattr__, but it does not seem to give the expected result