Nov 13, 2011 at 3:14 PM
Edited Nov 13, 2011 at 5:13 PM
This is the error i get trying to import nui from pykinect:
Traceback (most recent call last):
File "c:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\Python Tools for Visual Studio\1.1\visualstudio_py_repl.py", line 494, in run_file_as_main
exec(code, self.exec_mod.__dict__, self.exec_mod.__dict__)
File "C:\Users\Kenny\documents\visual studio 2010\Projects\KinectGame1\KinectGame1\Program.py", line 1, in <module>
from pykinect import nui
File "C:\Python27\lib\site-packages\pykinect\nui\__init__.py", line 15, in <module>
_nuidll_path = os.path.join(os.environ['MSRKINECTSDK'], 'MSRKinectNUI.dll')
File "C:\Python27\lib\os.py", line 423, in __getitem__
This is the sample code i am trying to run:
from pykinect import nui
from pygame.color import THECOLORS
from pygame.locals import *
KINECTEVENT = pygame.USEREVENT
"""Get skeleton events from the Kinect device and post them into the PyGame event queue"""
pygame.event.post(pygame.event.Event(KINECTEVENT, skeletons = frame.SkeletonData))
# event queue full
if __name__ == '__main__':
WINSIZE = 640, 480
# Initialize PyGame
screen = pygame.display.set_mode(WINSIZE,0,16)
pygame.display.set_caption('Python Kinect Game')
with nui.Runtime() as kinect:
kinect.skeleton_engine.enabled = True
kinect.skeleton_frame_ready += post_frame
# Main game loop
e = pygame.event.wait()
if e.type == pygame.QUIT:
elif e.type == KINECTEVENT:
# process e.skeletons here
I'm using the following SDK version:
Also, i have successfully run the demos that came with the SDK.
Any input on how to resolve this issue is greatly welcome.
Thanks in advance!
Nov 14, 2011 at 8:21 AM
this is a known issue & will be addressed shortly (Beta in a month). you can build from sources before that as soon as the fix is posted before that.
I'm so very excited to play with the kinect support you've added! Thanks for your hard work. Is there going to be a fixed posted before the issue is addressed in the beta? Thanks!
I'm also interested in working with this new API, but im obtaining the same error... Is there any way to solve it now?
I'm doing my undergraded thesis and it would be helpful if i could work with pykinect.
If you aren't in need of skeleton tracking you can use the SimpleCV python module with the freenect drivers to easily get the depth matrix and control the motor, until this pyKinect issue is fixed. SimpleCV is pretty awesome, and I'm looking forward to using
it with PyKinect.