Skip to content
Browse files

BF: Leave out Variable components when tracking start/stop times

This fixes an issue where Variable components cause AttributeErrors
when datatypes, that do not support attribute assigment, are used in the
component. The issue has arisen following new changes that the track start and
stop times of PsychoPy components. This fix stops Variable comps from being
added to the list of routine components that need start/stop times
recording. Fixes #2499.
  • Loading branch information...
dvbridges authored and peircej committed Jun 19, 2019
1 parent a45cfb4 commit e1bca1bdc4371aeae4f8fd6c7564f2d6aa5e3843
Showing with 2 additions and 1 deletion.
  1. +2 −1 psychopy/experiment/
@@ -134,8 +134,9 @@ def writeMainCode(self, buff):

code = '# keep track of which components have finished\n'
# Get list of components, but leave out Variable components, which may not support attributes
compStr = ', '.join([c.params['name'].val for c in self
if 'startType' in c.params])
if 'startType' in c.params and c.type != 'Variable'])
buff.writeIndented('%sComponents = [%s]\n' % (, compStr))
code = ("for thisComponent in %sComponents:\n"
" thisComponent.tStart = None\n"

0 comments on commit e1bca1b

Please sign in to comment.
You can’t perform that action at this time.