Howdy, Stranger!

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

Supported by

How to replace exp.set in OS4?

Hello,

I have a bit of an urgent problem. We ran an experiment using an older version of OS, which was programmed by a former colleague. Long story short: the laptop was stolen and on the new lab computers, we have OS4 installed. The experiment does not seem to be fully compatible with OS4 and I'm posting here to see if anyone can help me fix the problem (because my former colleague is no longer available):

The problem is that exp.set does not seem to be supported anymore in OS4.

We use an inline script as first item in a sequence, which specifies:

-------------------------

exp.set('sound_1', examples_y[0])

exp.set('sound_2', examples_y[1])

exp.set('sound_3', examples_y[2])

-------------------------

examples_y are various sound files specified in another inline script preceding the sequence.


Can anyone help me with this?


Thank you very much in advance!


Antje

Comments

  • Hi @Antje,

    In OpenSesame 4.0, exp.set() is no longer needed because variables are handled differently. Instead, you should use var to store them properly, like this:

    var.sound_1 = examples_y[0]

    var.sound_2 = examples_y[1]

    var.sound_3 = examples_y[2]

    This should work the same way, and OpenSesame should correctly track the variables throughout the experiment.

    Let me know if you run into any issues.

    Claire

  • Dear @cvanbuck ,

    Thank you so much, it works. However, there is another problem now. After a couple of trials, the experiment crashes and I get the following error:

    Error: ExperimentProcessDied

    The experiment process seems to have died as the result of an unknown problem. This should not happen! This error occurred in the unknown phase of item unknown.

    Would you have any idea how to address this? Given that the error is so unspecific, I'm attaching my script here. I hope that's ok.

    Best wishes,


    Antje


  • Hi @Antje,

    Glad to hear it worked!

    Regarding your new issue, I couldn't reproduce the exact same error, but the experiment did crash for me after a few trials (18, to be precise).

    Switching the backend from legacy to expyriment solved the issue on my end—could you try that and see if it works for you as well?

    Let me know how it goes!

    Claire

  • Dear @cvanbuck,

    Thank you so much for checking. I also tried changing the backends. With xpyriment, it also crashes (but slightly later, always after 98 trials), and with psycho, it does not work at all.

    Any ideas what might be causing this?

    Thank you so much,


    Antje

  • @Bob To me this sounds like it could be a memory issue with the low-latency plugins. Any ideas?

  • Dear @sebastiaan ,

    In case it helps, I would like to add that we did not experience this problem in OpenSesame 3.9.

    Thank you so much,

    Antje

Sign In or Register to comment.