Howdy, Stranger!

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

Supported by

Refresh the source of a loop

An experiment has been running with a loop item whose source was a table. After a while, I have replaced that table by an Excel data file, but the loop still uses the contents of the table. No way to get rid of it. I tried to refresh with an empty table, delete and replace the loop, save the experiment under a new name, and more. Nothing works. The only workaround is to recreate the whole experiment. Bad perspective because this should apply to several experiments, with a big waste of time. I am a beginner in Opensesame and a rookie in Python. Any help ? Thanks in advance !


  • edited June 2018


    If you select a file source in a loop, the table automatically disappears, like so:

    So what exactly have you done, and in what sense doesn't it work as expected?


  • Hello Sebastiaan,

    Thanks for your reply. I am a beginner in OS and I am progressively experimenting the various features of the program. By the way, it is a boon for me. Congratulations for this excellent work !
    So, after prototyping and running without any problem an experiment using a table as the source, I decided to test the 'file' source alternative. I copied the data from the table into an Excel file. I noticed the similarity and compatibility of both (copy-paste works fine). Then I changed the source parameter in OS and tried. Everything seemed to work ...
    But after a few changes in the Excel file, I realized that the loop item did not take them into account and that I was actually using the "old" data. That was confirmed by more obvious and radical changes in the Excel file.
    I started looking for possible amendments in the OS interface. I first realized that the "Preview" was also using the old data. I changed the source to table again and the old data was still visible. I went through the "Full-factorial design" and replaced the old table by a new emply table. No result. Of course, I took care of saving the new version of the experiment after each change. I also tried to save the experiment under a different name.
    Then I tried to delete the loop item and replace it with a new one. Still no change. I even tried to delete the temporary files and directories of the experiment in a desperate attempt (I am not aware of the way those files are organised and located), but the old data was still present and used by the program !
    Finally, I re-created the core of the experiment (mainly the loop item) from scratch and it worked fine.
    So I think that the problem seems to be somewhere in the replacement of the data after a shift from "table" to "source" in an existing experiment. I could replicate the problem 2 times.
    For your information, I have used the standard installation procedure, with no change in the names of the directories (I don't remember if that was allowed) and I put the experiments on the D: drive, each one in a distinct directory with all the other files required for that experiment (f.i. images). I am aware of the fact that OS copies the additional files into a working directory, following its own rules, but that doesn't seem to influence the result of the operations with other items like images used in a sketchpad.

    Don't hesitate to request additional information or testing (I'm fond of it at the moment ;-)

  • Hi Gérard,

    It sounds like you've copied the source file to OpenSesame's file pool, and then continued to modify the original file, rather than the copy in the file pool. To modify the file in the file pool, simply right click on it in the file-pool dock (Ctrl+P), and select 'Open' / 'Ouvrir'. I assure you that if you modify the file that way, the changes will be reflected when running the experiment!


  • Thank you Sebastiaan,
    You put your finger on it ! I've got it now ...


Sign In or Register to comment.