| Reference | Downloads | Github

Line from polygon "doesn't recognise fillColor"

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10):
PsychoPy version 2021.1.0
Standard Standalone? (y/n) yes
What are you trying to achieve?:
creating line “shapeStim” from the “polygon” drop-in component.
Changing “shape” to “line” no longer works because “fillColor” is not recognised; the experiment won’t start at all. Aborts with error message:
return obj(*args, **kwargs)
TypeError: init() got an unexpected keyword argument ‘fillColor’

What did you try to make it work?:
Just dropped in the polygon component, changed shape from polygon to line, did nothing else. No–won’t run. In “Appearance” tab, deleted the default color “white”, didn’t work; changed to $None, and changed to None, still didn’t work.

This is for experiment that used to work in last version, just being rewritten from scratch because no edits were being saved to run script anymore (as raised in other topic).

Gah, the trials and tribulations of a .0 release! This is one I missed - in a fix to other shapes I made Builder compile Polygon components with fillColor included, but I missed that the class for Line doesn’t know how to accept it. This is an easy fix (I just have to add a redundant parameter) so will get that sorted for 2021.1.1! Shouldn’t be long to wait - the first few bug fix releases are usually in fairly quick succession.

ok, will use thin rectangle