Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Errors with old experiment in new OS(3.2.1)

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 the sketchpad is 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

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

Sign In or Register to comment.