python与kinect2以及机械手通信出现AssertionError: 80要如何解决

C:\Python\Python36\python.exe "D:\Private_Person\lzy\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 53296 --file C:/Users/gwl/PycharmProjects/kinect1/pca.py
pydev debugger: process 17828 is connecting

Connected to pydev debugger (build 201.7223.92)
Traceback (most recent call last):
File "", line 1023, in _handle_fromlist
File "", line 219, in _call_with_frames_removed
File "C:\Python\Python36\lib\site-packages\pykinect2\PyKinectV2.py", line 2216, in
assert sizeof(tagSTATSTG) == 72, sizeof(tagSTATSTG)
AssertionError: 80

错误指向了PyKinectV2里面的assert sizeof(tagSTATSTG) == 72, sizeof(tagSTATSTG)
assert alignment(tagSTATSTG) == 8, alignment(tagSTATSTG)
IAudioBeamList._methods_ = [
    COMMETHOD(['propget'], HRESULT, 'BeamCount',
              ( ['retval', 'out'], POINTER(c_uint), 'count' )),
    COMMETHOD([], HRESULT, 'OpenAudioBeam',
              ( [], c_uint, 'index' ),
              ( ['out'], POINTER(POINTER(IAudioBeam)), 'AudioBeam' )),

感觉是版本不兼容,你底层的库要求tagSTATSTG这个结构体72字节,但是你的调用程序传入的是80字节

https://blog.csdn.net/scy261983626/article/details/104034812 看文章底部