psychopy.org | Reference | Downloads | Github

AttributeError: 'NoneType' object has no attribute 'close' in windows 7

If this template helps then use it. If not then just delete and start from scratch.

**OS: Win7
**PsychoPy version: 3.2.4
**Standard Standalone? y
**What are you trying to achieve?: making cognitive task

What did you try to make it work?:

**What specifically went wrong when you tried that?: when I run every task I get this error:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\backends\pygletbackend.py”, line 146, in init
style=style)
File “C:\Program Files\PsychoPy3\lib\site-packages\pyglet\window\win32_init_.py”, line 134, in init
super(Win32Window, self).init(*args, **kwargs)
File “C:\Program Files\PsychoPy3\lib\site-packages\pyglet\window_init_.py”, line 571, in init
self.create()
File "C:\Program Files\PsychoPy3\lib\site-packages\pyglet\window\win32_init
.py", line 266, in _create
self.context.attach(self.canvas)
File “C:\Program Files\PsychoPy3\lib\site-packages\pyglet\gl\win32.py”, line 212, in attach
raise gl.ContextException(‘Unable to share contexts’)
pyglet.gl.ContextException: Unable to share contexts

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\Arezo\Documents\untitled_lastrun.py”, line 70, in
units=‘height’)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\window.py”, line 411, 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 153, in init
fullscreen=self._isFullScr,
AttributeError: ‘PygletBackend’ object has no attribute ‘_isFullScr’
Exception ignored in: <bound method Window.del of <psychopy.visual.window.Window object at 0x000000001306FC18>>
Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\window.py”, line 545, in del
self.close()
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\window.py”, line 1782, in close
self.backend.close() # moved here, dereferencing the window prevents
AttributeError: ‘NoneType’ object has no attribute ‘close’

I have no idea what is it for and how should I fix it.