Fixed an error in generating Python wrappers