Variable image produces error when experiment is run online

URL of experiment: Pavlovia

Description of the problem:

Hi everyone,

I am new to PsychoPy and have modified a version of the Attention Network Task available on Pavlovia. It works when I run it locally but when I go to run the experiment online, I get the following error:

  • when setting the image of ImageStim: cues
  • the argument: stim/centre.png,stim/incongLeft.png,left,0,19,Central,incongruent is not an image" }

The argument which is being referred to is the cue for the task, which I have set as a variable called $cue which is defined in my conditions file. It appears that instead of retrieving the variable image and entering this as the argument (stim/centre.png in this case), it has retrieved all the parameters and entered all of these as the argument for what would be the image.

How can I change this so that it will enter the image only as the argument? Why is setting the image as $cue not enough?

Thanks in advance,
Omar.

Edit: Just in case PsychoPy uses the name “cues” for something else, I renamed this image component CueCondition but the error is still coming up.

Please could you show a screenshot of your conditions file? Is the image component file name set to $cue Each Repeat?

Here’s the conditions file:

The final 3 columns are just to aid in my own interpretation of results so they can be deleted if necessary (although I’d prefer to keep them). The first column is what I want the CueCondition variable image to take its arguments from.

And yes, the image component is set to $cue each repeat.

Thanks.

I think that the issue is that PsychoPy is failing to separate your CSV file into separate columns. You could try saving it as an Excel file or select a different CSV format.

I have the file saved as an .xlsx file - do you think this could be an issue?

I’ve just opened your psyexp file and seen that you have selected rows “2, 7, 12, 17, 20, 25, 30, 35, 38, 41, 46, 3, 8, 13, 18”. Online, I’ve only been able to select rows using “0:10” type format, or possibly also as a list. Try setting

useRows = '2, 7, 12, 17, 20, 25, 30, 35, 38, 41, 46, 3, 8, 13, 18'

in code and then put $useRows as the selected rows.

Also – to confirm this is the issue, you could try putting selected rows as something like 2:8

1 Like

That was it exactly, thank you so much!