psychopy/psychopy — Issue #80: ShapeStim inherits setSize, but has no size attribute
Author: maebert
Created: 2011-11-03 15:37:22+00:00
State: open

`psychopy.visual.ShapeStim` inherits the `setSize` method from `_BaseVisualStim`, (which in turn tries to call `self._set('size', newSize, op=operation)`), but has no `size` attribute.

from psychopy import visual
w = visual.Window()
s = visual.ShapeStim(w)
s.setSize((.5, .5))

produces:

Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.7/site-packages/PsychoPy-1.71.01-py2.7.egg/psychopy/visual.py", line 1138, in setSize
self._set('size', newSize, op=operation)
File "/usr/lib/python2.7/site-packages/PsychoPy-1.71.01-py2.7.egg/psychopy/visual.py", line 1255, in _set
exec('self.'+attrib+'*=0') #set all values in array to 0
File "", line 1, in
AttributeError: ShapeStim instance has no attribute 'size'

`ShapeStim` will need a `size` attribute to scale it's `vertices` accordingly.