Before yesterday, PsychoPy v3.1.5 was working and running experiments fine and as expected (on a Windows 10 PC), but since yesterday, when launching PsychoPy and going to the Builder or accessing Preferences, the attached error occurs. Nothing had been updated or installed between it last being known to work and this first occurring. However, it is a university IT-managed machine, so who knows?
After OK is clicked, Python crashes:
We have tried updating PsychoPy to 3.2.4, both x86 and x64 versions, including uninstalling/rebooting in between, as well as manually updating the Visual C++ redistributable and Python (3.6.6 and 3.8).
If anyone has any ideas how to fix this, please let me know.
C:\Windows\system32>"C:\Program Files\PsychoPy3\python.exe" -m psychopy.app.psychopyApp
A s s e r t i o n f a i l e d !
P r o g r a m : C : \ P r o g r a m F i l e s \ P s y c h o P y 3 \ p y t h o n . e x e
F i l e : s r c / h o s t a p i / w d m k s / p a _ w i n _ w d m k s . c , L i n e 1 0 6 1
E x p r e s s i o n : F A L S E
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Thank you so much for looking into this and providing this info, Jon. Much appreciated.
I had already taken the nuclear option and re-imaged the machine (as this is what IT did to solve the issue previously), but have noted this fix/workaround for if/when it happens again.
Sorry, could you clarify what’s happening now then? There are no error messages at all? And you’ve trying to run from the terminal but nothing happens? That’s very puzzling indeed.
There’s no error other than the “Python has stopped working” dialog when opening via GUI.
When running the troubleshooting command line, I get the same as before (without the line starting "This application has requested…), but the userPrefs/audioLib workaround still doesn’t work here.
Please let me know if you have any other ideas and/or if there’s any other info I can provide to help.
I know, I’m sorry. But very grateful of your assistance.
Yep, you’re right. It crashes right after from psychopy import sound. And the hardware/userPrefs line for audio libs is audioLib = pyo, sounddevice, pygame and the crash occurs whether it’s that line or any one of those alone (which may or may not be expected).