Bug (and fix) with device-manager tie-in (windows 11, 2026.2.2)

Just sharing my struggle and fix as a first time user, after getting my first experiment running i was trying to add a microphone and ran into an error. I tried really hard to find the original, but I only starting recording everything when I couldn’t fix it right away…

Here is the first thing I did capture:

File “D:\PsychoPy\lib\site-packages\psychopy_app\deviceManager\dialog.py”, line 146, in onAddDeviceBtn
self.populate()
File “D:\PsychoPy\lib\site-packages\psychopy_app\deviceManager\dialog.py”, line 89, in populate
self.pages[name] = DevicePanel(
File “D:\PsychoPy\lib\site-packages\psychopy_app\deviceManager\panel.py”, line 129, in init
prop.ChangeFlag(wx.propgrid.PG_PROP_READONLY, True)
AttributeError: module ‘wx.propgrid’ has no attribute ‘PG_PROP_READONLY’

Forgive the lack of information, but just in case it helps anyont, here is my file:

PsychoPy\lib\site-packages\psychopy_app\deviceManager\deialog.py file with code corrections that got it working on my machine. (confirmed I could at least add camera, mic, & xbox controller without a bugcheck)

dialog.py (6.5 KB)

We’ve spotted this in the latest release too; what seems to have happened is that wxPython released a new version in between our versions 2026.2.1 and 2026.2.2, which removed some functions and constants we were using, causing this error.

For the psychopy library we have what’s called a “lock file”, which protects us from this sort of thing by saying “use these package versions regardless of what’s available”, and we only update the lock file on a major release (meaning we have time to properly test that the updates don’t break anything). We didn’t have a lock file on psychopy-app (which is the code for the standalone app) so I’ve now added one and am preparing a 2026.2.4 release which will fix the error here :slight_smile:

As a quick fix in the meantime, you could downgrade to 2026.2.1 (which predates the wxPython update) or try using PsychoPy Studio (which doesn’t use wxPython at all)