If this template helps then use it. If not then just delete and start from scratch.
PsychoPy version 1.90.1:
**Standard Standalone? yes:
What are you trying to achieve?:
Produce an outcome that results in ‘20’ in 5% of trials, and ‘0’ in 95% of trials as a text stimulus.
What did you try to make it work?:
I tried to make as it’s suggested here in “Indivisibility” chapter.
import random propRare = 0.05 propCommon = 1-propRare numTrials = 40 points = ['0']*int(round(numTrials*propCommon)) + \ ['20']*int(round(numTrials*propRare)) random.shuffle(points) pointswon = points
What specifically went wrong when you tried that?:
I get this error:
points = ['0']*int(round(numTrials*propCommon)) + \
TypeError: ‘TextStim’ object is not callable
I ran this code in Jetbrains and it works fine, but not in PsychoPy. What am I missing here?