Howdy, Stranger!

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

Supported by

Running two connected experiments concurrently?

edited February 2016 in OpenSesame

I'm going to be building a minimal social situation experiment, requiring the experiment to be run simultaneously on two PCs. The choice made by participant A on computer A should affect the options given to participant B on computer B. Is there any particular way of doing this with OpenSesame? Currently I'm leaning towards connecting the two machines via SSH, or else using one computer with two distantly connected monitors.


  • edited 2:58AM

    Hi there, yes this is certainly possible. In the past I have done this just by using sockets. I have just asked my collaborator on that experiment for permission to send you our files to use as an example and I hope to hear back from him shortly. If it is ok, I will place the experiment here.

    Buy Me A Coffee

  • edited 2:58AM

    Ok, I have put a simple example online at Github. Use that and see if it can help you start off. I had a more sophisticated example but I cannot seem to find it currently. Please note that you need OpenSesame 2 to run them. I have not had the time to adapt them to OpenSesame 3. Good luck, and let me know if it works out for you this way.

    Buy Me A Coffee

  • edited 2:58AM

    Fantastic, thank you so much!

  • edited 2:58AM

    Hi all,

    I just wanted to point out the psynteract plug-ins that a colleague of mine, Felix Henninger, and I are working on at the moment. They are designed to implement real-time interactive experiments in OpenSesame using simple drag&drop items.

    The plug-ins are still under active development, but you can download our current version along with some example experiments for OpenSesame 3 from



  • edited 2:58AM

    One additional note regarding the experiment under discussion: I don't know the specifics of the experiment, but I assume that our ultimatum game example ( could be adapted to fit the purpose.

    Two participants are in different roles specified when starting the experiment using the psynteract_connect item (proposer, responder in the ultimatum game, could be A and B in your case). The proposer / participant A makes her decision first (you can use a run if condition that displays certain items depending on the current_role), then this decision is communicated using the psynteract_communicate item. Based on the decision of A, different options are shown to participant B.

    This way you can use the same experiment on both computers, have a random assignment of the roles, and communicate the decisions in real-time.

  • edited 2:58AM

    Hi everybody,

    Pascal has already presented our project perfectly (thanks!) -- I have nothing to add, except that you are warmly invited to contact us, and I can provide you with some further written documentation (which is in the works right now).

    What our plugins do is synchronize OpenSesame variables across multiple computers, and they require no additional code -- if you try them out, I'd love to hear about your experience!

    Kind regards


  • edited 2:58AM

    Wow that looks like an awesome project and feature to me!

    Buy Me A Coffee

  • edited 2:58AM

    That's perfect, thank you very much! I'll give them a go and let you know how it works out.

  • Hey,

    I just tried the plug-ins, because I want to implement the ultimatium game in our department. But, it doesn't work for me, maybe because I have the latest version of OpenSesame? Any ideas how to handle that?

    Thank you in advance!


  • Hi Laura,

    Given that the plugin is 5 years old it is quite likely that there are some compatibility issues. But as one of the developers @Pascal is still active here on the forum, there might be a chance that it can be fixed. For this to be possible, we need a lot more information from your side, though. Such as, what Opensesame version do you run it on? On which operating system. What does it mean when you say "it doesn't work"? You can't install it? It crashes when you want to use it? The plugin doesn't behave it is supposed to?

    Feel free to add screenshots, or the experiment that doesn't work. Perhaps we can help you.



    Buy Me A Coffee

  • Hey Eduard,

    thank you for the kind response!

    I struggle with installing the psynteract plugin. I run the OpenSesame version 3.3.10 on Windows.

    It get the following error massage (I only copied the explicit error message):

    I'm not quite sure what to do.

    Best, Laura

  • Hi Laura,

    The installation instructions were out of date. I shall propose it to be changed. Can you try to run this command:

    pip.main(['install',  ''])

    I think this should work, but I am not sure (I'm also new to this :) )

    Buy Me A Coffee

  • Hi Eduard,

    thank you for the quick response!

    Unfortunately, it doesn't work either. I get the following error message:



  • Can you run Opensesame as adminstrator and retry?

    Btw, it is better to copy code and error messages into here, rather than making screenshots (one of the advantages is that like that things can be copied and pasted). Here, on the forum, you can format what you write, so that code is rendered nicely.

    Buy Me A Coffee

  • When running OpenSesame as administrator, I got it to work, thank you!! :)

    I do have another question, which might be a little bit stupid.

    I found the example fpr the ultimatum game at github (thank you Pascal & Felix), however, I don't really understand where to paste the code, so I can run it in OpenSesame. I'm kind of lost here.

    Thank you in advance!


  • Either open Opensesame's first item in the overview and select general script. There you can replace all the code in it with what you copied from github. Alternatively, you can go to the start page of psyinteract's github, and download the entire directory as a zip file (, unzip it and in examples you'll find the experiment file you want.

    Good luck,


    Buy Me A Coffee

  • Hey Eduard,

    Thank you again for your help!

    I tried using the way via zip file, but for some reason I get the error message "Failed to load plugin 'psynteract_communicate'" even though it's shown in the drag and drop menu on the left side. Thesame is shown for psynteract_wait and psynteract_connect. I tried to run OpenSesame as an Admin, but it makes no difference.

    The traceback is as following:

    File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\", line 190, in new
      File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\", line 449, in load_plugin
        item = item_class(item_name, experiment, string)
      File "C:\Program Files (x86)\OpenSesame\share\opensesame_plugins\psynteract_communicate\", line 125, in __init__
      File "C:\Program Files (x86)\OpenSesame\share\opensesame_plugins\psynteract_communicate\", line 152, in custom_interactions
      File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\", line 240, in __getattr__
        raise AttributeError(u'%s not found' % var)
    AttributeError: custom_variables_widget not found

    Thank you!


  • Hi Laura,

    These are most likely Python 2/3 compatibility problems, which makes sense given that the plugin was written 5 years ago. I don't know how much work it would be to make it Python3 compatible, nor whether it would be worth the effort. That might be a question more suited to @Pascal and/or Felix Henninger. I guess if you contact them, they can tell you whether it is something they have time for and that it would be worth to wait for you.

    (Of course, you can also try the rehaul of the code yourself. It is not terribly complicated, but a good degree of Python knowledge is definitely an advantage.


    Buy Me A Coffee

  • edited November 2021

    Dear Eduard, dear Laura,

    please excuse my delayed reply. I left academia last year transitioning into an industry position. I still continue to maintain the open source packages I developed (e.g., the mousetrap plugin for OpenSesame and the mousetrap R package). However, it usually takes me some time to answer questions in the forum as I can only check it in my free time. Thanks so much, Eduard, for filling in from time to time.

    Thanks a lot, Eduard, for suggesting an update of the installation instructions for psynteract on GitHub. I have taken a look at these yesterday and added some updates to the README for the psynteract plugin for OpenSesame on GitHub.

    Regarding psynteract: I think there are some further issues (beyond the plugin installation which is now fixed) when using psynteract under recent versions of OpenSesame (as you have also just mentioned above). As some of these are related to the general psynteract Python library, I have spoken with Felix (@mezzopiano), who is psynteract's main developer, and we are working on fixing these issues. We will let you know once they are resolved.



  • Dear Eduard, dear Laura,

    a quick update on psynteract: Felix and I made some changes to both the psynteract library and the psynteract plugin for OpenSesame and things should be working with recent versions of OpenSesame now.

    You can find the updated installation instructions at (see also below). Please install the development version of psynteract (we have not put together a new release yet).

    You can install the latest development version by running the following command in OpenSesame's debug window:

    !pip install

    You might run into some issues with the underlying psynteract library as you already have psynteract installed, so you could run the following command in addition to make sure that the psynteract library also gets updated:

    !pip install --upgrade --force-reinstall --no-deps

    We noticed a small issue regarding the psynteract extension in the menu (as the OS Web extension somehow gets moved to the psynteract menu). We believe that this might be an issue on the side of the OS Web extension and have raised a corresponding issue on GitHub: (@sebastiaan : Hope this is correct - and sorry in advance in case it is on our end!).



  • @Pascal great work! And yes, the menu issue is on the radar, but I haven't had time to look into it yet.

  • Dear Pascal,

    thank you for the work you've put in, I appreciate it!

    I updated Psynteract, but still run into problems. The following error message keeps popping up:

    Hello from the pygame community.

    Expyriment 0.10.0+opensesame2 (Python 3.7.6)

    Main file: Lib\site-packages\ (7897e6)

    Unable to load numpy_formathandler accelerator from OpenGL_accelerate

    [2021-11-12 11:22:49,281:legacy:185:INFO] sampling freq = 48000, buffer size = 1024

    [2021-11-12 11:22:50,015:experiment:471:INFO] experiment started

    [2021-11-12 11:22:50,015:experiment:475:INFO] disabling garbage collection

    [2021-11-12 11:22:52,287:experiment:559:INFO] enabling garbage collection

    Unexpected error

    item-stack: experiment[run].psynteract_connect[run]

    time: Fri Nov 12 11:22:52 2021

    exception type: ConnectionError

    exception message: HTTPConnectionPool(host='server.example', port=5984): Max retries exceeded with url: /psynteract (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000029BB83D5948>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))


     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\urllib3\", line 157, in _new_conn

       (self._dns_host, self.port), self.timeout, **extra_kw

     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\urllib3\util\", line 61, in create_connection

       for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):

     File "C:\Program Files (x86)\OpenSesame\lib\", line 752, in getaddrinfo

       for res in _socket.getaddrinfo(host, port, family, type, proto, flags):

    socket.gaierror: [Errno 11001] getaddrinfo failed

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):

     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\urllib3\", line 672, in urlopen


     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\urllib3\", line 387, in _make_request

       conn.request(method, url, **httplib_request_kw)

     File "C:\Program Files (x86)\OpenSesame\lib\http\", line 1252, in request

       self._send_request(method, url, body, headers, encode_chunked)

     File "C:\Program Files (x86)\OpenSesame\lib\http\", line 1298, in _send_request

       self.endheaders(body, encode_chunked=encode_chunked)

     File "C:\Program Files (x86)\OpenSesame\lib\http\", line 1247, in endheaders

       self._send_output(message_body, encode_chunked=encode_chunked)

     File "C:\Program Files (x86)\OpenSesame\lib\http\", line 1026, in _send_output


     File "C:\Program Files (x86)\OpenSesame\lib\http\", line 966, in send


     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\urllib3\", line 184, in connect

       conn = self._new_conn()

     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\urllib3\", line 169, in _new_conn

       self, "Failed to establish a new connection: %s" % e

    urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x0000029BB83D5948>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):

     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\requests\", line 449, in send


     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\urllib3\", line 720, in urlopen

       method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]

     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\urllib3\util\", line 436, in increment

       raise MaxRetryError(_pool, url, error or ResponseError(cause))

    urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='server.example', port=5984): Max retries exceeded with url: /psynteract (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000029BB83D5948>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):

     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libqtopensesame\misc\", line 158, in run

     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\", line 477, in run


     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\", line 103, in execute

     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\", line 122, in run


     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\", line 51, in run

     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\", line 122, in run


     File "C:\Program Files (x86)\OpenSesame\share\opensesame_plugins\psynteract_connect\", line 63, in run


     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\psynteract\", line 61, in __init__

       self.db = self.server.database(db_name)

     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\pycouchdb\", line 156, in database

       (r, result) = self.resource.head(name)

     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\pycouchdb\", line 126, in head

       return self.request("HEAD", path, **kwargs)

     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\pycouchdb\", line 92, in request

       headers=headers, **kwargs)

     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\requests\", line 530, in request

       resp = self.send(prep, **send_kwargs)

     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\requests\", line 643, in send

       r = adapter.send(request, **kwargs)

     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\requests\", line 516, in send

       raise ConnectionError(e, request=request)

    requests.exceptions.ConnectionError: HTTPConnectionPool(host='server.example', port=5984): Max retries exceeded with url: /psynteract (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000029BB83D5948>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))

    To be honest, I don't really know what it means..

    Thank you in advance,


  • Hi Laura,

    I think the issue is that the psynteract connect item wants to connect to a psynteract server but you have no server running. You can select the "Offline test mode" option in the psynteract connect item to test your experiments without a server.

    However, for running actual interaction experiments, you need to set up your own server and install the psynteract backend on it with the psynteract extension. Further information on that is provided in the BRM paper and also online at

    Hope this helps!



  • Hi Pascal,

    thank you for the response. It makes sense! I'll talk to my supervisor to set up the server.

    In the meantime I would like to try it offline, however, I did not find the "Offline test mode" checkmark. Do I have to install each plugin seperatly after installing psynteract? I tried to do so, but for some reason I would have to install another OpenSesame version (I'm currently running 3.3.10).

    Thank you in advance.



  • Hi Laura,

    once installing the psynteract plugin for OpenSesame using the command above, all six psynteract items should be available within OpenSesame. The option "Offline test mode" can be found within the psynteract connect item.



  • Hi Pascal,

    I talked to my supervisior and he is willing to set up the server once I got the experiment to work. I chose the "Offline test mode", but the experiment stops at the inline script, with the followint error message:


    • item: process_decision
    • phase: run
    • item-stack: experiment[run].process_decision[run]
    • time: Fri Nov 26 11:51:47 2021
    • exception type: osexception
    • exception message: ` The variable 'partner01_decision' does not exist. Tip: Use the variable inspector (Ctrl+I) to see all variables.

    item-stack: experiment[run].process_decision[run] time: Fri Nov 26 11:51:47 2021 `

    Traceback (also in debug window)

      File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\", line 116, in run
      File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\", line 124, in _exec
        exec(bytecode, self._globals)
      Inline script, line 2, in 

    Is that because of the offline mode? That the only answer I can possibly find.

    Thank you in advance!



  • Hi Laura,

    yes, you are right, this issue is due to the offline test mode (as it does not support roles). However, you should be able to run the prisoner's dilemma example in offline test mode without issues.



  • Hey Pascal,

    my supervisor will set up the server, thank you so much!

    However, I still have a problem with variabel 'partner01_decision' (see screenshot). How can I handle it?

    Thank you!


  • Hi Laura,

    which experiment are you using for your test? If you are still using the ultimatum game, this cannot be tested in offline test mode (due to the not assigned roles, see above) and you will get the error message that you just shared ("partner01_decision" does not exist, which is the case as there is no partner). However, you could run the prisoner's dilemma experiment in offline test mode, as this paradigm does not have roles and then the own decision is internally used by psynteract to simulate a partner decision.



Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games