Howdy, Stranger!

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

Supported by

IndentationError:

Hi! Im very new in OpenSesame and Python, so please, be patient with me.
Im traying to follow the steps in the video that talks about Counterbalancing but Im stuck with IndetationError.
Can someone helping to undeerstand what is happening¿?
Thanks!

Comments

  • Hi Atenas,

    An indentation error happens when you have not properly indicated the structure of your code using indentation (tab or spaces at the start of a line). This is a fundamental property of Python, so if you feel that you don't have a clear grasp on indentation, then I would first take a step back and start a basic Python tutorial. That will save you a lot of time and frustration later!

    Cheers!
    Sebastiaan

  • Hi, Sebastian.
    Thanks a lot for your help!. I´m very grateful for OpenSesame. I´m from México, my university doesn´t have economic resources to acquires softwares like e-prime. So OpenSesame is saving me and making my life so much easier.
    Have a good day!

  • Hi, again, @sebastiaan !
    So, I finally could got the counterbalancing, just like the tutorial shows. But:
    I have four blocks in total, I need that the first block runs across all the participants (Loop_NoT), the next three are the blocks where I putted the inline_script to get the counterbalance, but, with this code all the blocks runs across the participants. I need just one of the three blocks runs:
    e.g:
    Participant 1 : Loop_ Not and b1 but I don´t want to run the block 2 and 3.
    Participant 2 : Loop_ Not and b2 but I don´t want to run the block 1 and 3
    and so on,
    ¿what do I need to modify?
    Thanks,

    .

  • Hi Atena,

    It looks like you're counterbalancing the order of the blocks right now (and not which participant does which block) although the details are a bit difficult to tell from your screenshot. I'm assuming that you have three blocks, and three groups of participants, and that you want to counterbalance like this:

    • Subject 1 → block1
    • Subject 2 → block2
    • Subject 3 → block3
    • Subject 4 → block1
    • Etc.

    Right?

    In that case, you can simplify the structure quite a bit, and put the blocks directly into the experiment sequence. And then you can use a Run If statement that checks the subject number and determines which block should be executed. So the structure would look something like this:

    experiment
    ...
    - Loop_NoT, run if: always
    ...
    - block1, run if: var.subject_nr % 3 == 1
    - block2, run if: var.subject_nr % 3 == 2
    - block3, run if: var.subject_nr % 3 == 0
    ...
    

    Note a few things:

    • The 'new' way to refer to experimental variables is var.[name], rather than self.get().
    • The modulo (%) operator gives the remainder of an integer division. This is useful for doing cyclical things like counterbalancing.

    Cheers!
    Sebastiaan

  • Right! Thanks a lot for your time, @sebastiaan !
    After many try I got it!

    So, I gonna let the printscreen if someone like me without experience with codes see this post.

    The best way to understand Sebastian´s explanation is consulting this two things:

    https://osdoc.cogsci.nl/3.2/manual/structure/sequence/
    https://osdoc.cogsci.nl/3.2/manual/variables/#using-conditional-if-statements

    And the result looks something like this:

    Thanks!

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