Error in Gamma Calibration

Running standalone 2021.2.3 on MacOS (Big Sur 11.5.2).

I tried to run gamma correction in semi mode, but when the input table is supposed to appear at the end, it gives me an error and crashes. Does anyone know how to solve this problem…?

Traceback (most recent call last):
File “/Applications/”, line 830, in onCalibGammaBtn
File “/Applications/”, line 1121, in init
wx._core.wxAssertionError: C++ assertion “!(flags & wxALIGN_RIGHT)” failed at /Users/robind/projects/bb2/dist-osx-py36/build/ext/wxWidgets/src/common/sizer.cpp(2168) in DoInsert(): Horizontal alignment flags are ignored in horizontal sizers

Any help is greatly appreciated.

1 Like

Hi hrkzogw,

I encountered the exact same issue running Psychopy standalone 2021.2.3 on Windows 10, and was wondering whether you managed to fix your problem?


I am running PsychoPy v2021.2.3 on an iMac (Monterey version 12.2.1) and am receiving exactly the same error when trying to go through the semi-automatic gamma calibration. After the colour patches have been shown, instead of opening a window where I can enter the luminance values to calculate the gamma values, I get the error reported above by hrkzogw.

I tried running it on a MacBook Pro as well (Monterey version 12.2 Beta; same PsychoPy version), but I get the same error. Has anybody figured out how to fix this issue?


I’m encountering the same problem using PsychoPy v2022.1.3. on Windows 10. I was thinking about temporarily installing an older version, running the calibration there and then apply the setting on the new version. On my machine I unfortunately was not able to do that, but maybe this works for someone else.

If you were able to resolve the issue another way I would be thankful if you could share. Alternatively, if someone maybe has experience in manually calculating the necessary values for the table in the monitor center and can share a guide or something similar that would be of great help also.

Hey guys, I actually managed to work around this particular problem recently. If you open up the script in an editor like Visual Studio Code or Brackets (ProgramFiles → PsychoPy → Lib → site-packages → psychopy → monitors → and go to line 1121. Just above that line, at the top of that little code snippet, you’ll see a bit of code that reads:

butBox = wx.BoxSizer(wx.HORIZONTAL)

If you change “axHORIZONTAL” to “axVERTICAL” and then save the script (you’ll need to be logged in as an administrator to save it) the luminance table appears just fine. The OK and CANCEL buttons will not be stacked one on top of the other, which is a little janky, but otherwise it works fine.

1 Like