Preloading text stimulus during static period prevents 1.84.1 from successfully building the script to run the experiment

static.psyexp (3.9 KB)
Mac OSX El Capitan
PsychoPy version1.84.0 or 1.84.1
**Standard Standalone? Yes

A super simple builder exp. with a .5 sec static period followed by a text stimulus set to load during the static period causes the builder to fail during generating the script to run. The following traceback shows up in a coder window if one is open when I click on run in the builder. The same psyexp file runs fine on 1.82.01. The psyexp file is attached.

Welcome to PsychoPy2!
v1.84.1
Traceback (most recent call last):
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/builder.py", line 1903, in runFile
    script = self.generateScript(self.exp.expPath)
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/builder.py", line 2091, in generateScript
    target=target)
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/experiment.py", line 206, in writeScript
    self.flow.writeBody(script)
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/experiment.py", line 1472, in writeBody
    entry.writeMainCode(script)
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/experiment.py", line 1665, in writeMainCode
    event.writeFrameCode(buff)
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/components/static/__init__.py", line 93, in writeFrameCode
    self.writeStopTestCode(buff)
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/components/static/__init__.py", line 123, in writeStopTestCode
    self.writeParamUpdates(buff)
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/components/static/__init__.py", line 154, in writeParamUpdates
    buff.writeIndented(code % self.params['name'])
TypeError: not all arguments converted during string formatting

Yes a colleague of mine came across this one yesterday and it’s fixed in the repository. Bug fix release for this is imminent but you can also fix manually by changing line 154 of
"/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/components/static/__init__.py"
from
buff.writeIndented(code % self.params['name'])
to
buff.writeIndented(code)