BART and same maxPumps for each participant

I am running a BART task and I want all participants to receive the same order of maxPumps. I am very new to PsychoPy and coding so I have no idea how to do this.


If there’s a random loop then putting a fixed number into the seed field might work.

I think there’s a seed field…I’m on my phone.

@wakecarter Thank you for the reply. Sorry for my delayed response. I did try to put an integer in the random seed field and it doesn’t resolve the problem. Any other suggestions?


I fixed this problem for you two weeks ago. The repository is here:

As you can see in the screen shots, each run has the same random order.
Screen Shot 2021-10-06 at 2.35.51 PM
Screen Shot 2021-10-06 at 2.35.33 PM

Am I missing something here?

Hi Jason!

Yes you did fix it for me and it works when running online. However, I’m trying to get it to work in the lab offline. Sorry for the confusion! I just wanted to see if I could figure it out via here rather than keep bothering you!

1 Like

Ah. Gotcha!

For local experiment try putting this on the Python side of maxpumps code:

import (random) 


Hi @jgeller112 thanks for helping. I did try inserting that code and it still resulted in different maxPumps between sessions. Any other suggestions?


Did some searching. This works:


pump_maxList = []
while len(pump_maxList) < 15:
    a = randint(2,66)
    if a not in pump_maxList:

copy_pump_max = pump_maxList.copy()

for n in copy_pump_max:
    b = (129-(n))


I am not sure why random.seed() does not work.

Yep! It works! Thank you so much!