Image path undefined in js version

Hello! I am currently adapting a few Psychopy experiments for Pavlovia in which participants are assigned different sets of image stimuli depending on the participant number entered.

]

On image component to I specified the images as

When the js script is generated from builder, these instances where the filepath is a variable becomes undefined, also the files in the “undefined” folders are not compiled in the html resources.

Should I define the image filepath in another way?

Thanks!

@Josh_Khoo, try
$'../path/' + thisSet + '/' … etc

Hi @dvbridges, that didn’t seem to do the trick.

The picture folders were still not compiled into the html/resources folder. For now, what seemed to do the trick is manually copying the relevant folders into the html/resources placing it alongside the input file(already compiled automatically previously).

Thank you.

1 Like