OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): 2022.1.3
What are you trying to achieve?:
I created an experiment in which the contrast of an image changes according to the users response. The experiment runs perfectly, when the user response device is a keyboard, but crashes, when it is replaced by an X-Box controller.
What did you try to make it work?:
I used almost the same experimental design for both devices. The only things I changed, were to replace the keyboard element by a joy button (X-Box controller) element and to redefine the level variable, so that it ts attached to the controller. Allowed buttons and a correct answer button were also defined.
What specifically went wrong when you tried that?:
The experiment started normally and showed the welcome screen correctly. But after that, the experiment didnāt continue as expected to the next routine with the loop, but was canceled. Then the following error message was shown in the Runner:
print(fāLevel: {level}. Correct:{resp1.corr}.ā)
AttributeError: āā object has no attribute 'corrā
################# Experiment ended with exit code 1 [pid:5680] #################
Since I defined a correct answer key/button, I donāt understand why Psychopy claimes that my response element doesnāt have a correct object. What can I do to make it work?
3 Elements of the Routine
Contrast defined as level variable, so it changes according to the users respone.
All Properties are set to āset every repeatā
Defintion of allowed and correct buttons of X-Box controller.
(Psychopy detects the Controller - it is used in a previous (working) step, too)
Code Fragment that defines the level variable. Works if the response device is a keyboard.