Howdy, Stranger!

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

Supported by

Python Inline Script code keeps disappearing

Hey All, I'm new and I've been going through the manual. I've come across a bit of an issue. When I enter python code into the prepare window, then save, then go to another tab and come back, the code I saved is gone. I'm in Windows 10 64bit using the latest version of OpenSesame. It's a little frustrating. I'm taking the online Python courses as well but they're updating their site on August 1st so anything I put in now in the lessons is going to get deleted there. So I have to wait a bit to get more practice in Python. I would think that if I hit save in OpenSesame, that it would save the content of the Prepare/Run windows. Am I doing something wrong? I was setting up my form using an inline script. I went to get the widget "from libopensesame import widgets" and when I went back to the window, the code I had input was gone. This has been happening a lot. Even when I start with from libopensesame import widgets. Any help is appreciated.


  • Hi Patricia,
    This should definitely not happen, just to clarify: you are typing in an inline script and when you switch screens the code disappears? It would be helpful to know a bit more, for example, between which windows are you switching, and is the error consistently occurring at the same time/when you perform the same action? It'd be great to have a look at the actual experiment to see where this behavior happens or see some printscreens

  • Hi Patricia,

    I think I encountered this behaviour before. Can you try to click somewhere outside the prepare window, before you press save? The changes you type into the inline_scripts only take effect, once you leave the window, so technically, your inline_script is still empty, when you try to save.

    In general, I agree that this can be a little annoyting. @sebastiaan, do you think this is something that can be avoided in future releases?


  • Hello Roelof,
    Thanks for the logo script. If I wanted to have the logo on every screen, could the code be placed in the backend settings instead of around widgets.

  • Hi Patricia,
    There is a way to set a standard background image; but this only works smoothly in 3.2:

    For the moment it seems much easier to just add an image to each form


  • Hey Roelof, Thanks for the info. I updated to 3.2 and it's going much better. I am able to add my logos on every form so that works great. I might try your suggestion when I get a bit more daring.

Sign In or Register to comment.