Psychopy 2021.2.0 crashing Python on experiment start

I have the exact same problem.
Running macOS Big Sur version 11.4 on a MacBook Air (2020).
Also tried to role back to [2021.1.4] but this sadly did not help.

I’m also having this problem! I’m very new to using PsychoPy so I wasn’t sure that I had done everything correctly. But it’s encouraging (?) to see that others are having the same system error that I’m having. Hopefully it’s fixed soon.

Rooslucas,
Does the following still not work for you even on 2021.1.4?

I’m guessing that the reason for the error is the following change noted in the Changelog:

  • Py: hardware.Keyboard class now supports ioHub as a backend and will use that in preference to Psychtoolbox keyboard (PsychHID) if ioHub has been started before the Keyboard is created. ioHub keyboard is similarly in performance but with fewer constraints (can handle a wider range of keyboards)

Unfortunately there seems to be no way to go back to Psychtoolbox keyboard without changing the source code (psychopy.hardware.keyboard — PsychoPy v2021.2)
@Becca

By editing the source code, I switched the keyboard from ioHub back to ‘ptb’ but that doesn’t fix the problem.
On my machine, the failure occurs at the following line of keyboard.py (around line 188):

buffer = _keyBuffers.getBuffer(devId, bufferSize)

However the code around there looks identical to that of Psychopy2021.1.4, especially in the context of Keyboard.backend = 'ptb' which I’ve now set, so I don’t know what the problem is.

Just here to say, I’m having the same issue!

fwiw, rolling back to 2021.1.4 did not work for me. I had to go back to a 2020 version entirely.

Hi There,
Thanks for flagging.
This is an issue the team were aware of, sorry it is affecting so many of you here! I need to check in on the status/progress - but watch this space and we will get back to you when we have an update!

Becca

1 Like

For me [2021.1.4] does work now. I had to change something in my settings: System Preferences > Security & Privacy > Input Monitoring and allow PsychoPy3. (Name error: name 'event' is not defined)

So rolling back to the earlier version does help for now.

1 Like

I have the same problem as smburns47. My Builder scrips that run just fine on 2021.1.4 (standalone) will not run on 2021.2.0 (standalone). I get the same error message as smburns47 reports. Even a bare-bones experiment (default with a default text component) crashes. Everything works if I reinstall 2021.1.4.
MacOS 11.4 (Big Sur),MacBook Pro (16-inch, 2019)

Hey there,

i am having the same problem as all of you above have reported (PsychoPy V2021.2.0 on WIN 10). My problem is, that going back to PsychoPy Version 2021.1.4 or older versoins doesn’t work either! At the moment, I am completely stuck and can’t go on with my work at all.

Has any solution or recommendation already been found?

Best,
Lea

Hi There,

The team have managed to put a fix in place for mac and that should be released in the next few days here Releases · psychopy/psychopy · GitHub - this is however the first time we are hearing of the issue on windows 10 - does that still happen if you completely install 2021.1.4 as a standalone version?

Becca

1 Like

Hello Becca,

I have uninstalled 2021.2.0 manually and installed 2021.1.4 as a standalone version, and now it works! Only installing 2021.1.4 and by doing that automatically deinstalling 2021.2.0 did not work, as it seems as if windows doesn’t really uninstall the program (although it is supposed to do so).

Thank you!
Lea

Hello,
I’m running window 10 and have the same problem. My experiment worked fine in v2021.1 but I updated to v2021.2 and the builder opens up with missing routines and the experiment doesnt run.

@Lealexandra What do you mean exactly by manually deinstalling or installing? can you specify the steps you took to make your experiment run again with v2021.1?

thankuuu!

That fixed it! For example, the keyNameFinder.py demo in Coder->Demos->Input now works!

1 Like

Hello all! I just wanted to say that I’m having this issue with 2022.1.2 on Mac iOS Monterrey.

I tried running an old experiment that a lab member made with her laptop on an older version of Psychopy, and it didn’t work. Then, I made the simplest experiment (just a Welcome page), and it still quits when I run it.

Any advice would be much appreciated.

3166.6223 INFO Loaded monitor calibration from [‘2022_04_05 23:06’]
2022-04-12 17:41:17.952 python[36018:11420148] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/89/4s3qp9x92h79kff104cw0j300000gn/T/org.opensciencetools.psychopy.savedState
2022-04-12 17:41:31.109 python[36018:11420148] Warning: Expected min height of view: (<NSPopoverTouchBarItemButton: 0x7f9d4f221ca0>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation.
2022-04-12 17:41:31.110 python[36018:11420148] Warning: Expected min height of view: (<NSButton: 0x7f9d8d71b690>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation.
2022-04-12 17:41:31.111 python[36018:11420148] Warning: Expected min height of view: (<NSPopoverTouchBarItemButton: 0x7f9d7eeea8c0>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation.
2022-04-12 17:41:31.112 python[36018:11420148] Warning: Expected min height of view: (<NSPopoverTouchBarItemButton: 0x7f9d7eeed730>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation.
2022-04-12 17:41:32.743 python[36018:11420348] NSSpellServer dataFromGeneratingCandidatesForSelectedRange timed out, index is 0
################ Experiment ended with exit code -4 [pid:36018] ################

1 Like

I am having the same problem and the same error message pops out. I couldn’t find the solution yet.

I solved it by downloading this version of Psychopy: Release Release 2021.2.3 · psychopy/psychopy · GitHub

Unfortunately, I think that’s the easiest workaround until there’s an update.

1 Like

Unfortunately it seems that 2022 is not yet compatible with all versions of MacOS. Until there is a fix you may need to continue using 2021.2.3.

Thank you so much for this thread!! Was spending hours spinning my wheels until I found it. I think a note about the incompatibility of the latest standalone with new MacOS on the main psychopy install page would be super helpful!