Instruction Before Block

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10):
PsychoPy version (e.g. 1.84.x):
Standard Standalone? (y/n) If not then what?:
What are you trying to achieve?:
I’m trying to build a Block Design experiment with image stimuli. In the beginning of each block, i want to display one of the given instructions: “View” (In portuguese is “Visualizar”) or “Reappraise” (In portuguese is “Reavaliar”).

What did you try to make it work?:
**In order to do so, i created a nested loop. The outer loop has a condition file, in which one of the variables is “Instruction”, containing the instruction “Visualizar” or “Reavaliar”. I added a text component in the outer loop, and in the “text” space i wrote “$Instruction”. That’s the way i learned to do it.

What specifically went wrong when you tried that?:
When i try to run the experiment, an error message appears: “NameError: name ‘Instruction’ is not defined”. Why does that happen, and how to correct this error?**



Do you have a routine called Instruction AND a variable called Instruction?

Yes.

I changed the name of the routine now, but the problem still persists:

“NameError: name ‘Instruction’ is not defined”.

This error is regarding the text properties, in which i put $Instruction in the text field.

I just found out what was wrong: the text was set as “constant”. When i changed to “set every repeat”, the error disappeared!

Sorry – I should have spotted that in your screenshot.