| Reference | Downloads | Github

A numpy and event error

Standalone PsychoPy 1.85.6
Win 10

NB: I have not updated to PsychoPy3 because this is an eye tracking experiment w/ eyelink (although this error is prior to adding the eyetracking code).

I am getting errors back about my keyboard objects being numpy.int64.

Although I can figure out a work around by forcing the objects into a different format, I would like further insight about this error because this is a builder experiment made using a standalone version of psychopy, and I can’t figure out what is causing the error in the first place. Other keyboard responses earlier in the experiment are working just fine. Even if I delete the keyboard that it fails on (which is during my test trials) the experiment begins failing at the same spot in the experiment when checking for ESC presses. Why would this occur halfway through the program despite all the keyboards being built in builder?

Any insight is greatly appreciated. Thanks.

Best regards,

It looks like somewhere, somehow, a variable called event has been defined as an integer, which is overriding the name of the event module. You could insert the line:


just prior to the line that causes the error to see what it contains. Also search through the code to find occurrences of the name event to see what might be happening with it.

1 Like

Thanks, Michael, I was able to find the error using your suggestion. Of course, event was imported from psychopy at the start of the experiment and so it printed as a module object until the routine where the error occurred when it was printed as 0 (at the first routine in my test trials loop). I removed the loop and the experiment ran through (with just one test trial, of course). That’s when it hit me, my test block file has a column named event (the naming came from optseq to denote trial type/jitter event).

TLDR; make sure you don’t name your block file columns with any words that are already in use by psychopy.

Thanks for your help, Michael.

1 Like