find the bug in pywrapper