Problem reading RGB color with the newer psychopy versions

URL of experiment: espCol [PsychoPy]

Description of the problem:
We have an experiment that was created on a previous psychopy version (2020) and the colors were expressed in the excel condition files in RGB format such as: [1.000, 1.000, 1.000]. In the object properties the color variable was simply expressed as $dot1col etc.
Now we have to change the experiment using either the psychopy versions 2021 and 2022. When the experiment is uploaded on pavlovia the following error appears: “Argument should be an array of numbers of length 3”.
Comparing the javascript of the experiments created in 2020 and the file uploaded on the 2021/22 versions, the function related to the color is the same: util.Color()
After reading the forum Pavlovia: Argument should be an array of numbers of length 3 we have tried having in the condition files one column for each RGB color and expressing the variable in the object properties as [$Col1, $Col2, $Col3]. This solution works when the experiment is uploaded online but it is not feasible considering the experiment structure and the number of condition files (we have to handle many stimuli with different colour ).
We were wondering if there is a way to solve the issue without changing the way the color is expressed.
The URL refers to a basic experiment in which the colour is read from a conditions list.
This is the URL of the same experiment carried out with version 2020.2.10 of PsychoPy and which works without error
Url: espCol [PsychoPy]

basic experiment whit error:
Github site: Massimo Vescovi / ColTest2022 · GitLab

basic experiment without error:
Github site: Massimo Vescovi / ColTest · GitLab

This sounds like your [1, 1, 1] was formerly read as an array and is now read as a string. If that is correct, you could try to convert it from a string back to a usable array using some code.

Python and JS:

dot1col = dot1col.replace("[","").replace("]","").split(",")

You may have to convert the list/array from containing strings to containing floats/numbers in the end.


import numpy as np

dot1col = np.array(dot1col)
dot1col = dot1col.astype(float)


dot1col = => {
  return Number(str);

Thank you very much Aius,

with your advice I solved the problem.
The Python commands were not necessary because execution in Psychopy gives no errors.