Psychopy error message when running experiment using randomization in builder

Hi everyone,

I am receiving an error message that I have not seen before and can not find much info on “trial handler” errors. I would appreciate any help. Thank you in advance.

OS (e.g. Win10): Mac 10.13.6
PsychoPy version (e.g. 1.84.x): latest
Standard Standalone? (y/n) If not then what?:
What are you trying to achieve?:
run my experiment using builder and randomization with trials

What did you try to make it work?:
am not sure because i have never seen this error before

What specifically went wrong when you tried that?:

the error looks like this :

t2=data.TrialHandler(nReps=asarray($b2Rep), method= ‘random’,

SyntaxError: invalid syntax

This sounds like an asarray error.

Thank you!

I have the same problem, but in my case, I am not using asarray(). This is the displayed error:

mini_blocks = data.TrialHandler(nReps=$how_many_mini, method='random', 

SyntaxError: invalid syntax

Did you manage to solve this problem? I would appreciate any help with this issue :slight_smile :slight_smile:

What are you putting into nReps?

how_many_mini or $how_many_mini

What values does how_many_mini take and where from?

Hi! how_may_mini is a variable created before the experiment which defines the number of mini blocks (int) within each block. So I have the following design:
10 blocks,
4 miniblocks (per block)
9 trials (per miniblock)
16 repetitions of images (on each trial).

So, I have 4 loops I don’t know whether this could cause any problem.

Try without the $ in nReps

works perfectly well thank you!