psychopy.org | Reference | Downloads | Github

Builder: AttributeError: 'NoneType' object has no attribute 'close'

Operating System: Windows 10
PsychoPy version: v3.0.0b10
What are you trying to achieve: A dot probe task using visual stimuli (neutral/ emotive faces). This initially worked fine, however, the next time I tried to run it, it failed to do so. After googling the issue, I have previously tried uninstalling the latest windows updates which resulted in the experiment working again, however, when I next go to try and use it I get the same message (see below). I am running out of updates to uninstall. Please can you help?

Running: C:\Users\user\Documents\MSc Psychology\Project\Jono’s Dotprobe\Dotprobetemplate_lastrun.py
Traceback (most recent call last):
File “C:\Users\user\Documents\MSc Psychology\Project\Jono’s Dotprobe\Dotprobetemplate_lastrun.py”, line 59, in
blendMode=‘avg’, useFBO=True)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\visual\window.py”, line 375, in init
self.backend = backends.getBackend(win=self, *args, **kwargs)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\visual\backends_init_.py”, line 32, in getBackend
return Backend(win, *args, **kwargs)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\visual\backends\pygletbackend.py”, line 227, in init
self._origGammaRamp = self.getGammaRamp()
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\visual\backends\pygletbackend.py”, line 326, in getGammaRamp
return getGammaRamp(self.screenID, self.xDisplay)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\visual\backends\gamma.py”, line 128, in getGammaRamp
raise AssertionError(‘GetDeviceGammaRamp failed’)
AssertionError: GetDeviceGammaRamp failed
Exception ignored in: <bound method Window.del of <psychopy.visual.window.Window object at 0x0DC02DD0>>
Traceback (most recent call last):
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\visual\window.py”, line 478, in del
self.close()
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\visual\window.py”, line 1111, in close
self.backend.close() # moved here, dereferencing the window prevents
AttributeError: ‘NoneType’ object has no attribute ‘close’

I have exactly the same problem you have.
As far as I hypothesize it out, I think the problem lies in Windows 10 version 1903. And with Nvidia GPU. It is known that Windows 10 version 1903 has Gamma Correction problem, which seems to be the cause of this case. Would you check your Windows 10 build version?

Hi Texton,
Thanks for your reply. I have just checked and indeed it is version 1903! I have now borrowed a laptop from the university (Windows 10 version 1803) and no longer experiencing the problem!