fix python registration error