Hi @YouriLMora, looking at the JS code, the fill color for your shape polygon_6 has an empty string for the color, which will not work. What have you put as the fillColor for that shape?
Great. Looks like this is fixed in the most recent version 3.1.2, where blank fillColor is compiled as “undefined” in JS, which works fine. I think having the fill color the same as the window color is just as good
Hello,
Progressing further in making the experiment compatible with pavlovia, I got a similar problem that apparently requires a modern solution :
The error message appears at the beginning of a routine (“train_MasculinFeminin”).
I have looked up the code thoroughly and I could not see what this ‘o’ color was referring to. I checked the colors from the external lists that I am using, and they all seem correct (“royalblue” or “forestgreen”). If you have insights on this one…
I tried again today and the message error is not always identical. The stated unknown named color can be “i”, “o”, or “è”. But most of the time it is “o”. I am clueless really
I just tried to run the task but received a ReferenceError msg not defined - this would mean that you need to define msg in your code component in the JS window. Open your code component, select “both” as a code type, and translate your python code from the left panel into JavaScript code in the right panel.
This error re: color is probably from the line motsMascFem_2.setColor(new util.Color(Couleur));
This is a text stim, where you are setting the color on every routine using the Couleur variable, which should be defined in your conditions file called MascFem.xlsx. This should be ok, but it looks like something odd is going on with how the trial handler is parsing your conditions file. I will try to recreate the error using a smaller task, and see what is happening.
@YouriLMora, the issue lies with how rows are selected in your trialHandler. If you did not select specific rows, the task will run. The error happens when you try to use a sequence to define your selected rows. Currently working on a fix to get the selected rows working correctly.
if resp_MascFem_2.keys: # ie if the list isn't empty:
if resp_MascFem_2.keys[-1] != Reponse: # check the latest response
msg="X"
elif resp_MascFem_2.keys[-1] == Reponse: # check the latest response
msg=" "
if len(resp_MascFem_2.rt)>1:
resp_MascFem_2.rt[-1]==resp_MascFem_2.rt[-1]+resp_MascFem_2.rt[-2]
@YouriLMora, the issue lies with how rows are selected in your trialHandler. If you did not select specific rows, the task will run. The error happens when you try to use a sequence to define your selected rows. Currently working on a fix to get the selected rows working correctly.
As a pragmatic solution, I created new external lists involving only the previously the selected rows. However, I believe there should be a more elegant solution. I would be happy to hear about it if you find it.