Variable from the loop is not recognised on a following inline script
In my current experiment, I am trying to show certain images in a sketchpad and then in a following canvas created from an inline script (it will also contain a slider). My aim is to use the same image in the sketchpad and the following canvas, for every circle.
For this reason, I defined a variable in the loop as the one you can see in the following image:
The images were presented correctly. Then, I wanted the same picture to be presented in the following canvas, so I wrote this, using the var.target:
from openexp.canvas import canvas from openexp.mouse import mouse my_mouse = mouse(self.experiment, timeout=20) my_canvas = canvas(exp) my_canvas.clear() my_canvas.text("") my_canvas.image(var.target,True, 0, -160, scale=0.6) my_canvas.prepare() my_canvas.show() self.sleep(0)
However, this leads to the following error:
Any suggestion on what I have to write in order to draw a certain [target] value from the loop to the canvas?
Thanks in advance,