psychopy.org | Reference | Downloads | Github

Dual Monitor - extended screen mode problem (under Windows 10, 1903)

Hi Developers,

I think I might have across with a bug for which I don’t know if it is down to windows 10 or psychopy3.

I can run a Psychopy3 file (coder or builder) without any problem under single monitor or Dual Monitor - duplicated screen mode.

I got a error message with the same PsychoPy3 program file about getGammaRamp ending “AttrtibuteError : ‘NoneType’ object has no attribute ‘close’” under Dual Monitor - extended screen mode.

I observed this problem with several settings:

  1. Desktop w/ Ryzen 5 cpu x Nvidia GeForce GTX 1050
  2. Notebook w/ intel i9 x Nvidia MX250
  3. Notebook w/ intel i3 (5th generation; internal graphics card)

Any Hope!

Please always post the entire error message not just the last line (which in this case is irrelevant). I suspect in your case the full error message reports that it’s failing to set the gammaRamp, which is caused by a known bug in Win10 1903 that we can’t fix (it’s Microsoft’s bug and they haven’t released the fix yet) so I’m afraid your options currently are to roll back the 1903 update (may be a good idea as it has been pretty bug-ridden as I understand it)

see also Error message since windows update to 1903

Using dual monitor with extended mode gives me lots of advantages, like everyone else, I hope that this problem would be solved under Windows 10 next update.

The message under the setting “Duplicated Screen Mode”;

and the error message under the setting “Extended Screen Mode”.

############### Running: C:\Users\namjo\Dropbox\pyCode\monit.py ################
pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
3.1372 WARNING Monitor specification not found. Creating a temporary one…
Traceback (most recent call last):
File “C:\Users\namjo\Dropbox\pyCode\monit.py”, line 3, in
win = visual.Window(screen=0, fullscr=False)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\window.py”, line 416, in init
self.backend = backends.getBackend(win=self, *args, **kwargs)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\backends_init_.py”, line 32, in getBackend
return Backend(win, *args, **kwargs)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\backends\pygletbackend.py”, line 239, in init
self._origGammaRamp = self.getGammaRamp()
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\backends\pygletbackend.py”, line 347, in getGammaRamp
self.screenID, self.xDisplay, gammaErrorPolicy=self._gammaErrorPolicy
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\backends\gamma.py”, line 159, in getGammaRamp
raise OSError(raise_msg.format(func=func))
OSError: The hardware look-up table (GetDeviceGammaRamp) was unable to be used. If you would like to proceed without look-up table (gamma) changes, you can set the Window parameter gammaErrorPolicy to "warn" or "ignore".
Exception ignored in: <bound method Window.del of <psychopy.visual.window.Window object at 0x0000020A7FAFCC50>>
Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\window.py”, line 529, in del
self.close()
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\window.py”, line 1517, in close
self.backend.close() # moved here, dereferencing the window prevents
AttributeError: ‘NoneType’ object has no attribute ‘close’

Release 3.2.4 has made substantial improvements here. In particular the window was making a call to this broken microsoft function even when it wasn’t needed (when you haven’t actually gamma-corrected your monitor). So if you aren’t a vision scientist needing linearised monitors then that version should now give you no issues.

If you do need gamma correction as well as extended desktop then I’m afraid you’ll just have to wait for MS to fix the underlying bug in their fuction call.