Howdy, Stranger!

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

Supported by

OSWeb Fatal Error

Hi,


I have an OS experiment with a Python backend, which I am trying to now transform to OSWeb. I'm changing all of my inlines from Python to JavaScript and it seemed to be going okay until the experiment crashed after the first trial due to a 'fatal error' which seems to be attributed to some stacking issue which I don't understand.

About the experiment itself: it's a lexical decision task, in which sentence stems end with either words or nonwords. Each sentence has several versions and I want each participant to randomly get one of the versions, as long as the number of trials per condition is balanced. For this reason, the list of trials each participant gets is created randomly using script, before the experimental loop begins. Accordingly, I define the loop using inlines but I think something went wrong: it looks like the experiment crashes immediately after finishing the first trial and entering the next one. So once the 2nd trial begins, one inline is run successfully, and then the experiment crashes, before anything actually appears on screen. I don't know if this is because the loop does not know how to move forward. At the end of the sequence (e.g., at the end of the first trial), I attempt to continue the loop using the following commands (inline loop_JS in the attached picture):

 exp.items._items['sequence'].prepare()

exp.items._items['sequence'].run()

And these commands seem to be working, as the first inline of trial 2 (resest_JS in the attached picture) is executed perfectly, and then the crash happens. So maybe the above commands are not enough to propel the entire loop forward, but rather just the first part of the following trial.

Attached is a screenshot of the error I get. Any advice would be super helpful.


Best wishes,

Elinor


Comments

  • Hi @elinora18,

    Could you upload your task or a stripped down version of it to this forum?

    Best,

    Fabrice.

    Buy Me A Coffee

  • Hi @Fab ,


    No problem. Please find attached the simplified version with JavaScript. I did the exact same thing with a Python backend and it worked perfectly.

    Thanks!!


    Best,

    Elinor


  • Hi @elinora18,

    I had a quick look at the task. the task stops after one trial becasue it reaches its end. I don't think you can trigger a seuqence from within itself in Javascript. My recommendation would be to use a loop with a high number of cycles and the break if function to condition it to the value of repeat_count (which seems ot be the variable you're using to decide whether another trial should be presented).

    I assume that you have your own reason to create the stimuli through code instead of using loops or nested loops. I don't reallly grasp your desig and so it may be that coding is the way to go. I assume that you checked that the shuffling is producing what you're after. Assuming it is, I think that the solution is to place the sequence in a loop so that it keeps running unless the break if condition is met.

    Hope this helps,

    Fabrice.

    Buy Me A Coffee

  • Hi @Fab ,

    Yes, the shuffling is working well and I want each participant to be able to get a random set of stimuli (one sixth of available stimuli, to be exact), while still keeping the same number of trials per condition (there are 12 conditions). So coding has been really helpful so far and has allowed a lot of flexibility and randomization but your suggestion definitely seems to be working. I added a loop, with the same sequence nested in it, with the same variables I already defined in the code, and simply entered the number of trials I want with a break if condition which indeed depends on 'repeat_count', as you pointed out.

    So overall, I am happy with the result! Thanks for the help!


    Best wishes,

    Elinor

  • Hi @elinora18,

    Glad I could help!

    Best,

    Fabrice.

    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