我需要使用操纵杆在Psychopy中获得X和Y的移动。但是当我运行Psychopy操纵杆的例子时,我得到以下错误。
##### Running: C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.81.02-py2.7.egg\psychopy\demos\coder\input\joystick_universal.py #####
Traceback (most recent call last):
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.81.02-py2.7.egg\psychopy\demos\coder\input\joystick_universal.py", line 19, in <module>
winType=joystick.backend)#as of v1.72.00 you need the winType and joystick.backend to match
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.81.02-py2.7.egg\psychopy\visual\window.py", line 347, in __init__
self._setupGL()
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.81.02-py2.7.egg\psychopy\visual\window.py", line 1394, in _setupGL
self._setupPyglet()
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.81.02-py2.7.egg\psychopy\visual\window.py", line 1228, in _setupPyglet
pyglet.window.get_platform().get_default_display().get_screens()
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyglet\window\win32\__init__.py", line 157, in get_screens
_user32.EnumDisplayMonitors(NULL, NULL, enum_proc_ptr, 0)
ctypes.ArgumentError: argument 2: <type 'exceptions.TypeError'>: expected LP_RECT instance instead of int
Exception AttributeError: "'Window' object has no attribute 'useNativeGamma'" in <bound method Window.__del__ of <psychopy.visual.window.Window object at 0x06C92A70>> ignored
当我尝试使用pygame.joystick时,我无法处理键盘事件,因此我无法退出执行