Howdy, Stranger!

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

Supported by

Item stack

Hi,

I wrote an experiment a few weeks ago. It could run. But recently, the experiment cannot run anymore (no warning, just freeze, so I have to abort the experiment). The detail said:

I use Mac, and after I updated the software, the problem is still there. Could you please maybe let me know what should I do?

Comments

  • edited December 2020

    Hi Lorraine,

    that sounds like a bug. Could you try to reproduce the error? Like building an experiment that is as simple as possible, but still shows this unwanted behaviour? Then could you share the experiment here?

    Oh, and you updated to Opensesame 3.3.6?

    Thanks,

    Eduard

    Buy Me A Coffee

  • Hi, Eduard,

    Yes, I am using the latest version.

    I also try to run an old experiment and it worked. So, probably it is something related to my code. Could you maybe help me check it?


  • Hi Lorraine,

    The code runs fine on my machine (Ubuntu 18, with Opensesame 3.3.6), so it probably really is a bug related to the Mac version of Opensesame. Have you tried it with all backends or only with legacy?

    In this case, I would indeed report it as a bug on the github page, unless @Daniel or @sebastiaan are already aware of this problem?

    Eduard

    Buy Me A Coffee

  • Hi @Lorraine ,

    The experiment looks fine to me. The error message indicates that you were able to abort the experiment by pressing Escape and then Q, which means that it didn't really freeze (otherwise this wouldn't have been possible either). Could you describe in a bit more detail what exactly happens?

    — Sebastiaan

    Buy Me A Coffee

  • Hi, Sebastiaan and Eduad,

    Thank you very much. It works on my computer now, somehow...

    Now, I have a new problem. I would like to add some buttons as a multiple choice response. However, I wish the text on the button could be changed based on the previous variable. Is that possible to define that in the form base plugin or use python under opensesame environment? If no, could you please recommend me how to make that work?


    Best,

    Lorraine

  • Hi @Lorraine,


    Because the text on the buttons is defined online, you will need to create the content of the display in the Run phase of your experiment.

    I see two options:

    1. You could use a feedback item (instead of a form_base item) to create the buttons, followed by a mouse_response item to collect the click. (For the difference between feedback items and sketchpad items, see: https://osdoc.cogsci.nl/3.3/manual/stimuli/visual/)
    2. Alternatively, you could create your form using Python inline scripting and place your code in the Run-phase tab of the inline_script item. For more information, see: https://osdoc.cogsci.nl/3.2/manual/forms/custom/#creating-forms-using-python-inline-script


    For more information on OpenSesame's Prepare-Run, see this article:


    I hope this helps. If you want more specific advise, please try to describe the behaviour you want to achieve as precisely as possible.


    Cheers,


    Lotje

    Buy Me A Coffee

  • Hi

    Yes, I have tried to draw buttons using the python inline script (your second suggestion). However, I am still lost how to add dynamic text on the button in this way.

    In my experiment, I randomly selected two letter stimuli from 8 letters. In the response page, there are 4 buttons. One button displays the two stimuli, while three buttons display unrelated letters. Irrelevant letters are also selected from those 8 letters. The button displaying the correct letters is also randomly selected.

    Also, I wonder how the response could be recorded in this process?

    Thank you for your help!

    Best,

    Lorraine

  • Hi @Lorraine


    I made an example script for what I think you are trying to achieve (see comments for explanation). Does that help?


    Cheers,


    Lotje

    Buy Me A Coffee

  • Hi, Lotje,


    Thank you very much for your code! It helps a lot.

    I changed a little bit to fit my experiment.

    It is weird that sometimes this code works, sometimes it reports an error as you can see above. In the trial that works, the irrelevant_pair can be printed, whereas when it reports an error, it cannot print the pair.

    It is really confusing. Thank you for your help. Hope to hear from you soon.

  • Hi Lorraine,

    Can you try to print var.irrelevant_pair before assigning it to var.text1 - var.text6? I would be surprised if this assignment would work when irrelevant pair doesn't have as many items as you have var.text variables (so 6). You can also share your experiment if you wish.

    Eduard

    Buy Me A Coffee

  • Hi,

    It's got the same error when printing it beforehand. So I uploaded the experiment.


    Best,

    Lanting

  • The problem is that your construction with if's and elif's does not cover all possibilities of target letters. So, if none of the 4 cases occurs (so, T1 is not S or D, and T2 is not F and G), then var.irrelevant_pairs, will only have one item. Then, when you try to assign it to the six values, you get that error. So what you need to do is to make sure that var.irrelevant_pair will always have six items before you assign its values to the six text variables, probably by manipulating your if-elif-else structure to cover all possibilities.

    Fyi, changing the order of the print statement and that assignment won't prevent the error message, but it does print out the value of var.irrelevant_pair, in all cases, so that you can see in which cases the error occurs. For example, in my case it occurred when the var.T1 = 'F'.

    Hope this clears things up.

    Eduard

    Buy Me A Coffee

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 http://45.77.173.118/ 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