OS: macOS Mojave (version 10.14.6)
PsychoPy version: v2021.2.1
**Standard Standalone? : yes
What are you trying to achieve?:
I’m trying to display a list of 6 English words in a random order, including the word “nan”.
What did you try to make it work?:
I inserted a routine which contains a text component (to display the 6 words according to a spreadsheet) and a keyboard component (to move to the next word). I also inserted a loop around this routine. Please see screenshot below for the design.
What specifically went wrong when you tried that?:
The experiment won’t start properly because of the following error message:
File “”, line 1, in
NameError: name ‘nan’ is not defined
However, when I remove “nan” from the 6 words OR when I just include “nan” in the text component, the experiment will start properly. I’m not very certain about this, but maybe this has something to do with the system confusing the English word “nan” with Python code “NaN” (Not a Number)? If so, is there any way I can fix this problem?