Error: Argument should be an array of numbers of length 3

Just uploaded my first psychopy experiment to Pavlovia and I am receiving this error when I am trying to “pilot” my experiment. No idea what to do… I have read the 2 other threads regarding this error and from what I gathered, it has something to do with the definition of a color parameter?

Every time I specified a color in my experiment I wrote “grey”, “black” , “white”, etc. Do I have to change the words into numbers each time?!

That post doesn’t help. What I need to know is if the error is pertinent to polygons, text color, or both. I have changed all of the color data on my excel files (which is pertinent to text color) to RGB [see photo below], but the error still occurs.

I have tried entering the same thing into the builder block to change the color into RGB with numbers, but now my text/polygon completely disappears.

This works:

This doesn’t work:

Try [1,1,1] I.e. with square brackets

Then try adding a dollar sign in front

Adding the brackets doesn’t work but I will try adding a dollar sign in front now

Adding the dollar sign allows for the text / polygon to be displayed correctly, thank you. All that is left now is to update all color parameters using this method. Hopefully when I am finished then the experiment will work in Pavlovia. I will keep this thread updated if it works or not.

Don’t know what to say. I’ve updated all the colors for text and polygons using the $[x,x,x] format. In the excel files I used the [x,x,x] format. In psychopy everything works fine, but pavlovia still shows the same error. What could possibly be causing this error???

Are you using a 2021 version? I’m still on 2020.2.10.

I think that there may be an issue with Pavlovia adding an extra layer of square brackets to Excel cells. Try without the brackets in Excel. My crib sheet advice would be to have separate columns for each value, but I think the newest versions should be able to cope.

I am using a 2021 version (2021.1.2 to be exact). I cannot run the experiment in an older version as it doesn’t recognize certain elements which are new to the 2021 version. I will try to get rid of the brackets in excel and see if that does the trick.

Removed the brackets from excel, still getting the error in pavlovia.

I found the error. In experimental settings, for the color I had “$[0.6549, 0.6549, 0.6549, 1.0]”. Got rid of the “1.0” which was the 4th and extra number and it worked.

1 Like