Pykinect: WindowsError: [Error -2147467262] No such interface supported

Aug 22 at 4:59 PM
Hi,

I'm pretty new to programming generally and pykinect in particular. What I've been trying to do is get a few frames from the kinect (in this case the RGB camera) and store it in a numpy array. The following code does work, it spits out a ton of "error", when the frames aren't ready then throws out:

Unhandled exception in thread started by <bound method Runtime._event_thread of <pykinect.nui.Runtime object at 0x065E9DF0>>
Traceback (most recent call last):
  File "C:\WinPython-32bit-2.7.6.2\python-2.7.6\lib\site-packages\pykinect-1.0-py2.7.egg\pykinect\nui\__init__.py", line 199, in _event_thread
    self._nui.NuiImageStreamReleaseFrame(self.video_stream._stream, depth_frame)
  File "C:\WinPython-32bit-2.7.6.2\python-2.7.6\lib\site-packages\pykinect-1.0-py2.7.egg\pykinect\nui\_interop.py", line 185, in NuiImageStreamReleaseFrame
    _NuiInstance._NuiImageStreamReleaseFrame(self, hStream, pImageFrame)
  File "_ctypes/callproc.c", line 945, in GetResult
WindowsError: [Error -2147467262] No such interface supported

Any ideas what I can do about this?

Thanks

Dennis

The code:

import pykinect
from pykinect import nui
import time as t
import numpy as np

img=np.empty((480,640,4),np.uint8)
kinect=nui.Runtime()
kinect.video_stream.open(nui.ImageStreamType.Video, 1, nui.ImageResolution.Resolution640x480, nui.ImageType.Color)
while True:
    try:
        frame=kinect.video_stream.get_next_frame(0)
        frame.image.copy_bits(img.ctypes.data)
        t.sleep(1)
        kinect._nui.NuiImageStreamReleaseFrame(kinect.video_stream._stream,frame)
        break
    except:
        print('error')
kinect.close()