Errors with old experiment in new OS(3.2.1)
in OpenSesame
Hi everyone,
I tried to start my very simple experiment (programmed in OS 3.1.9) in the latest version of OS and I receive the following error: The variable 'number_low' does not exist.
What did change?
The aim is to pop a random number from "list_low" so, that I can use [number_low] in a sketchpad to show a picture with that poped number (file="low[number_low].jpg")
import random
list_low = [1,2,3,4,5,6,7,8,9,10]
random.shuffle(list_low)
number_low = list_low.pop()
exp.set ('number_low',number_low)
I really wonder, as it worked before.
Thank you so much!
Comments
Hi,
It sounds like you're trying to use a variable (
number_low) before it has been defined, for example because you're setting the variable in the Run phase, whereas thesketchpadis created during the Prepare phase. However, that has nothing to do with different versions per se.To figure this out, and see if there's some change in behavior in 3.2 v 3.1, could you attach the experiment here?
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!