Hi, I’m very new to PsychoPy and am struggling to make a loop where trial 1-4 appear in each corner of the screen and have their respective number as the only allowable key.
My conditions are in a trial definition file, and I have the Keyboard Component changed to set every repeat, looking at the variable BoxTestCresp. The cells in this variable are 1,2,3,4. Given that you don’t need to put the letter keys in quote marks when using a condition file I would’ve thought that it’d be okay to do the same for the number keys.
When I run the experiment, it crashes out with this error:
```AllowedKeys variable `BoxTestCresp` is not string- or list-like.
I vaguely understand what this means, but it still crashes out if:
- I type ‘1’,‘2’,‘3’,‘4,’ in each cell, like how I would if I wanted all buttons mappable at all times and am just typing out the string
- I type '1,'2,'3,'4. I know Excel learns to map cells as a string with just the 1 quote mark so thought this would be a fix.
- I use the Format Cells function in Excel to declare BoxTestCresp as text not number.
- I call them num_1 num_2 num_3 num_4. I saw someone in another forum suggest this as an answer.
It doesn’t crash out if I use ‘‘1’,’‘2’,‘‘3’,’‘4’ (two single quotes, one single quote) instead, but even then it doesn’t accept the number key as input.
It does work if I remapped to a,b,c,d, but the response box only takes 1234 so it needs to be these keys.
What am I missing in order to call the specific number key through this loop successfully?