If this template helps then use it. If not then just delete and start from scratch.
OS (e.g. Win10):
PsychoPy version (e.g. 2021.1.4
**Standard Standalone? Y
What are you trying to achieve?:
Hello everyone, I am following along the example of building a blocked bilingual stroop task from chapter 8 in Bulding Experiments in Psychopy.
All has gone well until I have got to the counterbalancing part, where I have two groups, GroupA for English Stroop first, and GroupB for Maori Stroop first.
In order to allow Psychopy to choose which condition should go first, Group A or B, the book states in the experimental settings create a new variable called group and default A. I went ahead and did this no problem (See screen shot below)
Then within the conditions file in my block loop, I changed the conditions to what the book suggests to see the image below of my conditions expression.
What did you try to make it work?:
I re-read the book, retyped the info and I double checked all my excel conditions files were equal and had all the same capitalisation etc.
What specifically went wrong when you tried that?:
This is the error message I got.
Traceback (most recent call last):
File “C:\Users\rh4818\Documents\Psychopy book exp\Stroop\Stroop_lastrun.py”, line 218, in
trialList=data.importConditions(‘Group’+group+’.xlsx’),
NameError: name ‘group’ is not defined
Experiment ended.
I have definitely created the group variable in the experimental conditions, but it seems like psychopy isn’t interpreting that from the expression I wrote in the conditions file for my Block. Maybe something has changed since the book was written?