OS (e.g. Win10): Win10, update 1909
PsychoPy version (e.g. 1.84.x): 1.90.0
Standard Standalone? (y/n) If not then what?: y
What are you trying to achieve?:
This error occurred when running a task that worked fine on MacOS and Win Vista but failed on Win10
raise AssertionError(‘GetDeviceGammaRamp failed’)
AssertionError: GetDeviceGammaRamp failed
Exception AttributeError: “‘NoneType’ object has no attribute ‘close’” in <bound method Window.del of <psychopy.visual.window.Window object at 0x1C836ED0>> ignored
It stems from a bug in Win10 update 1903. Microsoft claimed it was solved but apparently that doesn’t apply to the gamma ramp bug. My understanding is that during window creation pyglet attempts to get the gamma ramp from Win10, and according to Microsoft’s bug report “Microsoft has identified some scenarios where gamma ramps, color profiles and night light settings may stop working.”
I determined that Win10 Extended Display (PC is attached to a high-res monitor and a low-res projector) caused the error. A single monitor did not.
A work-around was to use the Display Setting in Win10 of ‘duplicate displays’ instead of ‘extended display’. But this gave poor resolution on my monitor.
Change the ‘window type’ in PsychoPy’s Builder Preferences from ‘pyglet’ to ‘pygame’. Then the window creation occurs normally without errors. There may be better solutions in later PsychoPy versions (e.g. 3.x has new options) but was the only good solution for v1.90.0.
This topic may be redundant for those who understood the earlier threads, but I hope it clarifies the solution for someone.