It looks like you're new here. If you want to get involved, click one of these buttons!
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¿?
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!
There's much bigger issues in the world, I know. But I first have to take care of the world I know.
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:
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?
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:
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:
- 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:
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:
And the result looks something like this: