| Reference | Downloads | Github

'numpy.ndarray' object has no attribute 'TrialHandler'

I’m trying to add new loop in my experiment and get this error before init the loop. I’ve managed to create a loop before, but this one gives an error:
trials2 = data.TrialHandler(nReps=2, method=‘sequential’,
AttributeError: ‘numpy.ndarray’ object has no attribute ‘TrialHandler’

Hi @vivian_polli, the error suggests that somewhere in your experiment the data module has been overwritten with a numpy array. Have you used data as a variable at any point prior to this call to create a new TrialHandler? For example, you may have included a column called data in one of your trial handlers that was created before this one. To fix, rename any variables called data that you may have created.

It’s works! Thanks!