OS: Win10
PsychoPy version: 3.0.4
Standard Standalone? yes
I’m running an experiment which is basically the Alternative Uses Task: participants see a word on the screen (a common household object like “paperclip”). Within three minutes they have to come up with as many alternative uses for that object as possible. They type in their answers and press ENTER after each use. The uses they have previously typed appear as a list in the top right corner of the screen. When the three minutes are up, the experiment moves on automatically (to an instruction screen, and when they press space it moves on to the next word for which they again have 3 minutes).
When each word is shown, a short sound is played as well. It’s a long story, but these sounds are necessary because I later want to play those sounds to them in sleep.
There are three different parts to this experiment: part 1 (they do 4 items), part 2 (they do 8 items), and part 3 (8 items again).
It’s all working, but the problem is that the experiment crashes near the end. I’ve actually gotten two different errors from this crash; one was a ‘memory error’ (I stupidly didn’t save the exact error out of panic because it crashed during the actual experiment). The other one was the ‘RuntimeError’ in the title. I will paste the full error below.
As I said, the error occurred during the testing of a participant. The weird thing is that it never occurred before (obviously I ran some pilots before starting the experiment!).
Some other things:
- Part 1 of the experiment (with only 4 items) never crashes.
- Part 2 was when I first encountered the error. It crashed for two participants (who were testing at the same time) after 6 items.
- I made some small changes hoping to remove the error: rather than giving the sound item a blank duration I gave it a fixed duration that was slightly longer than the longest of the sounds. I also followed the slightly strange advice at the bottom of this post: Experiment crashes when it runs for too long and I unchecked the log file saving.
- Then when I ran Part 3 (because I am determined to keep going with these participants!) with these slight changes, it crashed for one participant after 7 items (so it did one more item than before), and it didn’t crash for the other participant.
The full error:
Running: C:\Users\CUBRIC\Desktop\martyna\AUT\AUT_part2_lastrun.py
pyo version 0.9.0 (uses single precision)
8.6346 WARNING psychopy.sound.backend_pyo.init could not find microphone hardware; recording not available
Traceback (most recent call last):
File “C:\Users\CUBRIC\Desktop\martyna\AUT\AUT_part2_lastrun.py”, line 1267, in
win.flip()
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\visual\window.py”, line 796, in flip
callEntry[‘function’](*callEntry[‘args’], **callEntry[‘kwargs’])
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\sound\backend_pyo.py”, line 392, in play
self.terminator.start()
File “C:\Program Files (x86)\PsychoPy3\lib\threading.py”, line 846, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can’t start new thread
So, does anyone have any ideas? Note that I’m using pyo because sounddevice cuts off my sounds before they finish. Admittedly I haven’t tried pygame, and that’s going to be my next step just to see if that makes a difference. However, going off the error message and the fact that my small changes seemed to help, I’m not sure that it’s a sound backend issue but rather one of memory or parallel processes that are happening?