PsychoPy version: 2020.1.2
Hi there! I am attempting to display the correct data from a spreadsheet based on prior responses in psychopy, but I am running into some difficulty.
Basically, I am having people select their sex and race at the beginning of the experiment using sliders and would like to display all of the values from a column based on their responses. Here is the structure of the experiment so far and an explanation of the problem I’m running into.
There is an initial routine that includes 2 sliders - “sex” and “race” - with three options for “sex” and four for “race”. Next I have a routine with a loop around it. The loop calls in a spreadsheet that has a set of values for each combination of sex and race (so 12 columns total). Inside of the routine I tried a couple of options, and landed on creating 12 separate text stims with a conditional start statement for each (i.e., for the “male_white” text stim, the conditional start is “sex.getRating() is 1 and race.getRating() is 1” because male on the slider is set to 1 and white on the slider is set to 1). Then the text is set to the correct column from the excel file for the sex/race combination in the conditional. The duration for each text stim is set to 3 seconds.
When I try running the experiment, I am able to get the correct value to appear for the first item in the loop, but then the experiment won’t continue to the next routine in the loop (a fixation cross) and just goes blank after 3 seconds. I assume this is because of the conditional statement not initializing for the 11 other text stims.
Is it possible to get this to work? Is there a better way to do this?