OpenSesame Portable
  • EdwinEdwin
    3081 karma points

    For anyone who's interested: I've managed to run OpenSesame (see below for the most recent version) from a USB-stick, using Portable Python 2.6. It works really well, apart from being a tad slower than the original (as is to be expected, of course), but that seems largely due to the fact that OpenSesame is run from source. It has all the toolboxes build in, even the eyelink-functions.

    I recommend that, if you would like to use OpenSesame Portable for experiments where timing is crucial, you test the timing on your specific system. If, after that, you would be so kind as to report your findings here, it would be greatly appreciated.

    OpenSesame Portable is a nice solution when you're using different computers a lot, or if you want to have people fill out questionnaires at home or anywhere outside of the laboratory. Another great possibility is using it in education, so there's no need to install OpenSesame on a lot of computers (which might have proven to be quite a bit of a bother, considering some IT-support departments).

    OpenSesame Portable is downloadable here, and information can be found here.

    Featured releases:
    OpenSesame 0.25
    OpenSesame 0.26
    OpenSesame 0.27.1
    OpenSesame 0.27.2 (Python 2.7)
    WinPython-OpenSesame-0.27.2 (Python 2.7)

    For downloading, see here and select the version of your choice.

    Kind regards, Edwin

    1 rose bysebastiaan
  • sebastiaansebastiaan
    13134 karma points

    Hi Edwin,

    That's great! Does this mean that you created a USB stick that contains a full portable Python runtime environment + OpenSesame source + all OpenSesame dependencies? I definitely want to take a look at that, particularly if it works out of the box with the Eyelink. Could you perhaps upload a disc image somewhere?

    Regards, Sebastiaan

    PS1: You probably know that you can also run the OpenSesame binary (the .zip download) from a USB stick, right? But that's not as flexible, of course.

    PS2: pylink is a proprietary library, so including and distributing it is strictly speaking a licensing violation. Not that that's a very big deal at this point, though.

    ---
    Sebastiaan Mathôt - http://www.cogsci.nl/smathot

  • EdwinEdwin
    3081 karma points

    Hi Sebastiaan!

    I'll try getting it to you somewhere before the weekend. It's a USB with the 2.6-version of Portable Python (but with all the stuff OpenSesame needs to run added to it), the OpenSesame binary (downloaded from your site), including the plugins.

    I did not realize that pylink was a proprietary library, but thanks for the heads up! I won't be distributing that, then. Since you own a copy of pylink, it's not license violation if I were to give it to you, right?

    Regards, Edwin

  • sebastiaansebastiaan
    13134 karma points

    Hi Edwin,

    No, sending it to me and circulating it within your university etc. should be fine, I think. I also know that Jon "PsychoPy" Pierce contacted SR research and asked them about including PyLink in PsychoPy. I believe they agreed. So you could try that.

    Regards, Sebastiaan

    ---
    Sebastiaan Mathôt - http://www.cogsci.nl/smathot

  • EdwinEdwin
    3081 karma points

    Hi Sebastiaan,

    I've transferred a .zip-file with everything you need. Mind you, this is actually running OpenSesame from source (but to be able to do so, I needed to modify the basis portablePython). It's probably possible to create a PortableOpenSesame.exe, but this was the short solution.

    Regards, Edwin

  • sebastiaansebastiaan
    13134 karma points

    Hi Edwin,

    [resuming from email] This is awesome and (after a quick test) it works really well! I have one suggestion: You now have a couple of different .bat files, one for every drive that OpenSesame might be on. Couldn't you just create a single .bat file like this?

    cd .\opensesame-0.25
    ..\PortablePython_1.1_py2.6.1\App\python.exe opensesame --pylink

    Would you mind if I make this portable version available on the website? Particularly for people who require additional modules to be installed (notably Eyelink users) this is really convenient. I'd have to strip out pylink, obviously, and perhaps clean up the .bat system, but otherwise it seems good to go. It would also be very convenient for people who want to play around with the source code, but don't want to install a full Python environment on their computer.

    Thanks man!

    Kindest regards, Sebastiaan

    ---
    Sebastiaan Mathôt - http://www.cogsci.nl/smathot

  • EdwinEdwin
    3081 karma points

    Haha, yes, that seems like the easier way to go. Thanks!

    I wouldn't mind it at all if you were to put it on the website (as long as there's no violating any licenses, but you seem to have a keen eye for that, so I guess that won't be a problem). Hope it's going to be helpful.

    Cheers!

  • sebastiaansebastiaan
    13134 karma points

    Would you be interested in having an FTP account for cogsci.nl? That way you could upload and update the .zip file yourself, and post a permanent link here on the forum (or wherever).

    License-wise, I think the only thing that would need to be done is strip the pylink folder. Or, alternatively, you could ask SR Research if it's ok to bundle pylink.

    ---
    Sebastiaan Mathôt - http://www.cogsci.nl/smathot

  • EdwinEdwin
    3081 karma points

    Yeah, that'd be nice! I'll try contacting SR Research in the meantime.

  • sebastiaansebastiaan
    13134 karma points

    I just tried it on the Eyelink system here (I'm in Marseille right now, so OpenSesame wasn't installed yet), and it works like a charm! Eyelink support right out of the box. Great work man!

    I'll add a page about it to the OpenSesame documentation.

    (Btw, I saw your pull request on the slider plug-in. Thanks! I'll get to it soon.)

    ---
    Sebastiaan Mathôt - http://www.cogsci.nl/smathot

  • EdwinEdwin
    3081 karma points

    You're welcome! Thanks for adding it to your website.

  • EdwinEdwin
    3081 karma points

    The most recent pre-release of OpenSesame 0.26 is now available in a portable version too! See here!

  • sebastiaansebastiaan
    13134 karma points

    That's great man!

    Please let me know if you find any bugs in the pre-release. If no bug reports come in (and if I find no bugs myself) I will probably release 0.26-pre6 as 0.26 stable later this month.

    ---
    Sebastiaan Mathôt - http://www.cogsci.nl/smathot

  • EdwinEdwin
    3081 karma points

    OpenSesame 0.26 is now available in a portable version! See here.

  • sebastiaansebastiaan
    13134 karma points

    Great man, thanks! I'll probably use it for an experiment this afternoon.

    ---
    Sebastiaan Mathôt - http://www.cogsci.nl/smathot

  • embodimentembodiment
    2247 karma points

    Hi Edwin. I report you a problem I encountered using the portable version in Windows 7. When I try to run my experiment, OpenSesame simply automatically closes itself. However, I strongly suspect it is a problem related to the PsychoPy backend, because the same thing does not happen when I run another experiment builded with the legacy backend. Otherwise, the problem may be derived from one or more libraries that I import at the begin of the script. This is the incipit of my code:

    from psychopy import visual, core, event, logging, sound from math import radians, atan2, sin, cos, floor from pyglet.window import key import random

    Do you know the reason for that?

    Best,

    Andrea

  • EdwinEdwin
    3081 karma points

    Hi Andrea!

    Terribly sorry, I must've missed that... I can give you some (preliminary) feedback on your question: there seems to be nothing wrong with portable Python*. I've just tested it and all the libraries you import are indeed importable in the Portable Python shell. That being said, I'm afraid I can't provide any further insight in the problem. I can't even reproduce it myself: OpenSesame Portable behaves in exactly the same way as the desktop version. Could you perhaps provide some further details on your experiment? Are you using only static visual stimuli, or sounds** and movies as well?

    Best, Edwin

    .* the version that accompanies OpenSesame Portable 0.26, that is.

    ** for reasons I have not quite figured out yet, OpenSesame Portable crashes when asked to produce sounds on Win7, but not on WinXP. This is true for all backends (sadly), so I do not believe this is the origin of your problem, as yours is running fine on the legacy backend.

  • embodimentembodiment
    2247 karma points

    I've tested two different experiments with the Psycho backend. Specifically, one of them is a simple paradigm in which a cross appears at the center, the participant has to press the space bar, and after a random time a beep is produced. Then the participant has to judge the interval between the pressed key and the sound by simply holding a key pressed for the duration of the estimated interval. I tried to delete the sound stimulus, since you wrote that there are problems with that, but the problem is the same.

  • sebastiaansebastiaan
    13134 karma points

    Hi Andrea,

    Perhaps it would help to describe in a bit more detail what happens:

    • Does OpenSesame crash completely, i.e. the window vanishes and you don't receive any error message at all. Or is it a 'graceful' crash that gives you a Python error message of some sort, or an error message in opensesame.exe.log?

    • Does it happen right away when you start an experiment, randomly during the experiment, or always at a specific stage of the experiment?

    • Does it always happen when you use the psycho backend, or only with some experiments?

    • Does it happen on all computers?

    Cheers, Sebastiaan

    ---
    Sebastiaan Mathôt - http://www.cogsci.nl/smathot

  • embodimentembodiment
    2247 karma points

    Hi Sebastian.

    • Yes, the window disappears, OpenSesame close itself and I don't receive any error message.

    • The problem happens when I run the experiment. OpenSesame opens the experiment window but immediately after it crashes.

    • I tried two different experiments builded with psycho, and the problem remains the same.

    • I tested the code on two computer, with same results

    Best,

    Andrea

  • sebastiaansebastiaan
    13134 karma points

    I see. That sounds pretty consistent and persistent. This one is going to be tricky to figure out, I think, particularly because it appears to be specific to your set up (I can't replicate it either).

    • Are you running the latest version of the Python portable package, or one of the 0.26-preX packages?

    • Are you sure the problem is specific to the Python portable OpenSesame package, or does the psycho back-end also crash in the same way with the 'official' .exe or .zip downloads? (What happens if you simply run the default template with the psycho back-end?) If the problem is not specific to the Python portable package, this suggests that it's really a problem with the PsychoPy libraries and not the packaging per se. In that case you could consider reporting it on the PsychoPy user list: http://groups.google.com/group/psychopy-users

    Cheers, Sebastiaan

    ---
    Sebastiaan Mathôt - http://www.cogsci.nl/smathot

  • EdwinEdwin
    3081 karma points

    Now available: OpenSesame Portable 0.26.2!

    What's new? Added support for OpenSesameRun, meaning it's possible to either use OpenSesameRun to run experiments without using the experiment builder or even use a batch-file to start an experiment directly (a tutorial on how to do this is included!)

    It's not really spectacular, I'll admit, but could be useful nonetheless.

  • sebastiaansebastiaan
    13134 karma points

    Great man! The included howto's are a nice addition.

    ---
    Sebastiaan Mathôt - http://www.cogsci.nl/smathot

  • JarikJarik
    131 karma points

    Hi Edwin,

    A researcher here at VU University Amsterdam had problems with OpenSesame Portable and EyeLink. After replacing the folders eyelink_log and eyelink_stop_recording from your Portable version with folders from opensesame_eyelink_plugins version 0.17 the problems were solved. Could you use the latest version of the opensesame_eyelink_plugins when building a new OpenSesame Portable release?

    Best, Jarik

  • EdwinEdwin
    3081 karma points

    Hi Jarik,

    Sebastiaan mentioned it, so I'm already working on it (I was quite surprised as well, since I'm working with the older version without experiencing any troubles). Thanks for the heads-up! It's great to know that you're using the portable version! Is everything else working all right?

    Best, Edwin

    EDIT (20-06-2012, 13:31): New package uploaded, now including the newest eyelink plugins and the new joystick plugin.

  • JarikJarik
    131 karma points

    Hi Edwin,

    Wow that's fast! I'm not a researcher myself (I'm a support technician), but I will install it in the lab and let you know if there are any (other) problems.

    Thanks, Jarik

  • bachmanbachman
    110 karma points

    I'm using OpenSesame portable with an EyeLink for an experiment I'm currently running and it's working very smoothly. This was a huge help because I didn't have to convince anyone that it's okay to install something on the lab computer. Thanks for this really useful distribution!

  • plastic_studentplastic_student
    493 karma points

    Hey, thank you folks for Opensesame and Opensesame Portable. I had some nice success in implementing what was on my mind for a while.

    Maybe you can answer me a few questions:

    Is is also possible to run the Opensesame Portable Folder just from the hard disk and not from an external drive, but with the same behavior like from an external drive?

    And is it possible to write an python script, that saves logged data not into the opensesame portable folder but on some web based medium, means one of our servers?

    greets

  • sebastiaansebastiaan
    13134 karma points
    Is is also possible to run the Opensesame Portable Folder just from the hard disk and not from an external drive, but with the same behavior like from an external drive?

    Sure, it doesn't matter from which location you run it. A USB stick, a network drive, a regular hard-disk—all should work.

    And is it possible to write an python script, that saves logged data not into the opensesame portable folder but on some web based medium, means one of our servers?

    Yes, with some inline scripting. Python has extensive networking capabilities. There are plenty of ways to do this, here's a few:

    You can get the location of the regular logfile like this:

    path = self.get('logfile')

    Cheers!

    ---
    Sebastiaan Mathôt - http://www.cogsci.nl/smathot

  • KyleKyle
    304 karma points

    So would I be too presumtuous to ask (because I don't quite have the device yet to test it) that if I run OpenSesame Portable on a Windows tablet, that I can have people just use the touch screen to take my experiement/questionnaire? I already have it designed and ready on regular OpenSesame, so I just wonder if the port over to a tablet device will be touch friendly. I imagine the hardware input won't conflict since it isn't code-sensitive, but I just thought I would ask.

    Cheers,

    Kyle

  • sebastiaansebastiaan
    13134 karma points

    Hi Kyle,

    With all touch-screen devices that I have encountered, touches simply appear as mouseclicks to the software. So I suspect that it should be no problem—You can develop the experiment on a computer with a mouse, and run it on a (Windows) tablet with a touch screen.

    That being said, if you are buying an expensive device for that purpose, it might be wise to double-check, of course!

    Cheers, Sebastiaan

    ---
    Sebastiaan Mathôt - http://www.cogsci.nl/smathot

  • EdwinEdwin
    3081 karma points

    Now available:

    OpenSesame Portable 0.26.4

    This version uses the no-SDL version of PyLink. This means there will be no more troubles with playing sounds. Although we tested furiously, we appreciate feedback if you do experience any problems.

    OpenSesame Portable 0.27-pre30

    This is the portable release of the newest pre-release version of OpenSesame 0.27. Expyriment is added to the site-packages, so the new back-end should run smoothly.

    EDIT: updated to pre12

    EDIT (26-10-2012): updated to pre18

    EDIT (30-11-2012): updated to pre30

  • JákupJákup
    930 karma points

    First of all, I would just like to say, what an awesome project this is. The portable edition is why I've persuaded my supervisor, that we should use OpenSesame in an upcoming experiment, instead of needing to install dependent libraries for running a matlab-coded experiment at a number of in campus computers. And second, it's really great that you're updating it this fast. Keep up the good work! :)

    I've just downloaded the pre30 release, and found a bug. I'm using the new form widgets, and when I run the experiment, I get the following runtime error:

    Error: Runtime error
    Description: Failed to create widget
    ‘label: _init_() keywords must be strings
    

    And, a lesser bug: the help icon seems to be missing.

    Best regards, Jákup

  • sebastiaansebastiaan
    13134 karma points

    Glad you like it!

    Regarding the error, could you perhaps describe in detail what you did to trigger the error? Please also post the traceback that you can find in the debug window.

    Cheers!

    ---
    Sebastiaan Mathôt - http://www.cogsci.nl/smathot

  • JákupJákup
    930 karma points

    Well initially it did not reveal anything in the debug window. Only the above error message was displayed in a popup window. When i run OS with the --debug option on, I get the following lines in the debug window, when the same runtime error is displayed:

    canvas.__init__(): morphing into openexp._canvas.legacy
    theme.py(188).load_icons: 
    >>> 
    

    This also occurs with the other backends. [EDIT] Actually, it only occurs with legacy and psycho. xpyriment gives some unicode error, which probably isn't related to this.

    So perhaps the error lies in initiating the canvas? Perhaps it's even related to the missing icon?

    The experiment works in the standard pre 30 release, and I didn't do anything differently.

    Hope that helps a bit :)

    • Jákup
  • sebastiaansebastiaan
    13134 karma points

    Hi Jákup,

    My guess is that you are using the form_base plug-in to create a custom form, right? Could you perhaps post the script for that item?

    Cheers!

    ---
    Sebastiaan Mathôt - http://www.cogsci.nl/smathot

  • JákupJákup
    930 karma points

    Yes I am. But it doesn't seem to be working for any of the form plugins, save for form_multiple_choice, and it doesn't seem to matter what the content is.

    Just try the default template and add a form, and you should be able to replicate the error.

    If not, then we know it's a problem with my setup :)

    EDIT: Btw. I've tried the custom form example from the documentation area as an inline script, which works fine.

    Best regards, - Jákup

  • sebastiaansebastiaan
    13134 karma points

    Jákup: Indeed, I tried a form in the Python portable package and it crashed as you described. The problem was due to a difference between Python 2.6 (used by the portable package) and 2.7 (used by the official packages). I fixed it, and as of 0.27~pre32, the forms should work with both versions of Python again.

    Edwin: I think I will declare 0.27 'stable' really soon, which is the first version to use Python 2.7 by default. One thing that is a little unfortunate is that the media_player plug-in doesn't work with Python 2.7. Daniel is working on media_player_vlc, which I'll include with 0.27, but unfortunately there are still some issues with that plug-in.

    Are you planning to stick with Python 2.6 for the portable package? If so, it might be good to bundle the media_player with Python portable (is it already, I can't remember?) so that people still have the option to use the media_player. There are installation instruction included with the README of the plug-in:

    Cheers!

    ---
    Sebastiaan Mathôt - http://www.cogsci.nl/smathot

  • JákupJákup
    930 karma points

    Great! I just tested it (after downloading the pre32 source into the OpenSesame Portable folder and editing its batch file) and it works like a charm :) And thank you very much for the fast update!

    Best regards, Jákup

  • JákupJákup
    930 karma points

    Actually, version 2.7.3.1 of Portable Python comes with many of the dependencies required by OpenSesame (Matplotlib, NumPy, PyGame, PyQt4, Python Image Library, and PySerial), so it can run out of the box with OpenSesame.

    PsychoPy and PyOpenGL are missing (though they can easily downloaded and added as modules in Portable Python using the "python setup.py install" command), so only the legacy backend works readily. And, of course, PyLink isn't included either, given its proprietary status.

    But, in sum, version 2.7 could make it much easier for you to maintain OpenSesame Portable Edwin :)

    All the best!

    Jákup

  • EdwinEdwin
    3081 karma points

    Hi Jákub,

    Thanks for your comment! I appreciate the input.

    What modules come standard with what version of Portable Python isn't really an issue, since it's not that hard to add them ourself. Besides, the distributions that we provide are completely equipped, meaning they run out of the box with OpenSesame anyhow.

    Interestingly, very recently, we've had the same discussion in the 'OpenSesame team' and we think that there isn't really a strong advantage of using 2.7 over 2.6. That being said, Daniel did create a version of OpenSesame Portable using Portable Python 2.7.2 (see here).

    Best!

    Edwin

  • bf42vobf42vo
    267 karma points

    Hi,

    Is there any way to edit the batch file so that it automatically finds the correct directory for whichever computer it's on? I'd ideally like to be able to send my experiment to some participants as a .zip file, but am unsure how this can be done without instructing each participant to edit the path themselves.

    Thanks in advance! :)

  • EdwinEdwin
    3081 karma points

    Hi,

    Do you mean the run_opensesame batch file? This already automatically finds it's own directory. Basically, you could send anyone the opensesameportable-0.27.1.1-win32 folder (as a .zip, as you mention), include your own experiments (e.g. an experiment called 'awesome_experiment.opensesame.tar.gz') in the '*/user/Experiments' folder and include a batch file (in the main folder! opensesameportable-0.27.1-1-win32, where run_opensesame.bat is located as well) with the following content:

    ECHO off
    
    title Awesome Experiment
    
    cd .\opensesameportable-0.27.1-1-win32\opensesame-0.27.1
    
    SET /P snr=Subject number: 
    
    ..\PortablePython_1.1_py2.6.1\App\python.exe opensesamerun ..\user\Experiments\awesome_experiment.opensesame.tar.gz --subject=%snr% --logfile=..\Data\subject-%snr%.csv --fullscreen --pylink
    

    Data will be saved in the '*/user/Data' folder.

    If you mean you would want to send just an OpenSesame experiment to your participants they wouldn't be able to run it, since you need OpenSesame (Run) to run .opensesame(.tar.gz) files.

    Does this answer your question?

    Best,

    Edwin

    1 rose bybf42vo
  • bf42vobf42vo
    267 karma points

    Hi Edwin,

    Thanks for your reply. I thought that I had to specify the destination in place of the '..', but now the batch file is running fine.

    However, I am having another problem with running the actual experiment. When I run it through portable the experiment crashes when audio is first introduced. I receive the following error: "Attribute Error: 'module' object has no attribute 'Ellipse'". I noticed above you said that sound can cause OS to crash. Is there any way to get around this problem?

    Thanks again!

  • EdwinEdwin
    3081 karma points

    Hi,

    Great that it's running! It seems the error you mention originates from expyriment, or rather: the expyriment package included with OpenSesame Portable. I'll look into repackaging it. For now, you could fix your problem by switching to a different back-end.

    Good luck!

  • EdwinEdwin
    3081 karma points

    As from today, OpenSesame Portable will no longer be based on Python 2.6 Portable. WinPython 2.7 (32bit) will be used in stead.

    WinPython is a portable distribution of Python, as is Python Portable. The main difference is that WinPython is a far more complete package, that is especially designed for scientists. Included is Spyder, a rather complete code editor (my personal favourite!) that resembles the Matlab editor. Libraries that could aid researches (such as NumPy, SciPy and Matplotlib) are included as well.

    The benefit of using WinPython over Python Portable is this completeness. I think this is a nice step forward, but I would appreciate any input you guys have!

    Download page Direct link

  • sebastiaansebastiaan
    13134 karma points

    This looks like a big improvement. Thanks!

    ---
    Sebastiaan Mathôt - http://www.cogsci.nl/smathot

Please sign in to add a comment
Copyright 2011-2013 Sebastiaan Mathôt // Photos originally from Lucnix and WikiMedia // Powerered by Vanilla

In this Discussion

Social

Matt Wall says: Psychology experiment-builders enter the age of the tablet - OpenSesame now runs on Android: http://t.co/fG6t7Zi0gy (cc @cogscinl)

Latest on cogsci.nl

The Smartphone Revolution in psychological science: OpenSesame mobile // NewsSetting up Kubuntu 13.04 for research // TutorialThe black swan // OpinionMore