Pavlovia problem with assigning image file with string defined variable

URL of experiment: fiexp [PsychoPy]
Github: Yang-Ming Huang / fiexp · GitLab

Description of the problem:
My experiment ran without problem on my local end. However, when uploaded to Pavlovia, it’s complain about unknown resources.
0425

My guess is that it doesn’t like the way how I define image file. See script below

oldimage = f1 + f2 + ‘.png’
thisExp.addData (‘oldimage’, oldimage)
if memorytype == 1:
newimage =oldimage
if memorytype == 2:
if f1 == ‘r’:
f1new = ‘b’
if f1 == ‘b’:
f1new = ‘r’
newimage = f1new + f2 + ‘.png’
if memorytype == 3:
if f2 == ‘t’:
f2new = ‘s’
if f2 == ‘s’:
f2new = ‘t’
newimage = f1 + f2new + ‘.png’
if memorytype == 4:
if f1 == ‘r’:
f1new = ‘b’
if f1 == ‘b’:
f1new = ‘r’
if f2 == ‘t’:
f2new = ‘s’
if f2 == ‘s’:
f2new = ‘t’
newimage = f1new + f2new + ‘.png’
thisExp.addData (‘newimage’, newimage)

Hello,

you might find the answer in the documentation. I guess you simply did not add the image as a resources for online use.

https://psychopy.org/online/resources.html

Best wishes Jens

Thanks. Problem solved. There are so many little tricks that do great things in PsychoPy