Python not responding at the end of the experiment and weird data structure

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): 2022.2.1
Standard Standalone? (y/n) If not then what?: y

Hi all,

I’m working on an experiment right not. It works fine for the first 5 subjects, and then suddenly I kept seeing ‘Python is not responding (see screenshot below)’ at the very end of the experiment. Before and after this I did NOT change anything in the script. Weirdly, when seeing this, the output data SOMETIMES (not for all) had different structures from before, although I did get complete data–I have a loop in my experiment, and there used to be an empty line after each loop, but when ‘Python is not responding’ at the end, there was no empty line after each loop.

I tried to reinstall PsychoPy but that did not help. I have no idea what may cause this so I’d appreciate any suggestion to debug! Thanks so much!

Data before the error, with empty lines after each loop

Data after the error, some data with no empty lines after each loop

Is this related to the assigned participant number? Do you have any code that refers to expInfo[‘participant’] ?

Do you have concentric loops? The blank lines look like the behaviour when isTrials is ticked for both the outer and the inner loop.

Hi Wakefield–thanks so much for your reply!
You are right I double checked the data structure. It is because I have a nested loop with two inner loops, and ‘istrials’ was checked for one but not the other. I checked both of them and hopefully now I got consistent data structures. But somehow I still saw ‘python not responding’ at the end-all else works fine. I will carefully check all the codes again.


Hi all-- I want to update on this issue. I got this “python not responding” issue for a new study recently and I figured out it is because I printed too many things. So comment out your “print” statements if you don’t need them if you have the same problem.

1 Like