NameError: name ___ is not defined

Thanks for this, after a lot of debugging was getting the inexplicable name errors which only appeared after lots of code revisions, switching between MacOSX and Windows. I couldn’t understand why the trial loop wasn’t populating/declaring the variable name that eventually presented.

Another solution that worked for me: PsychoPy Preferences -> App tab -> reset preferences and restart and open your code. This solved this strange runtime error.

3 Likes