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

OS (Linux Mint 19.1):
PsychoPy version (3.0.6):
Standard Standalone? (y) I

I’ve managed to get PsychoPy to launch but it produces this error no matter the experiment. I’ve been using the builder this whole time.

I took these steps to get it running PsychoPy3 on Linux installation issues (solved)

File “/home/toni/verbi_lastrun.py”, line 63, in
units=‘height’)
File “/usr/local/lib/python3.6/dist-packages/psychopy/visual/window.py”, line 386, in **init**
self.backend = backends.getBackend(win=self, *args, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/psychopy/visual/backends/ **init** .py”, line 32, in getBackend
return Backend(win, *args, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/psychopy/visual/backends/pygletbackend.py”, line 227, in **init**
self._origGammaRamp = self.getGammaRamp()
File “/usr/local/lib/python3.6/dist-packages/psychopy/visual/backends/pygletbackend.py”, line 326, in getGammaRamp
return getGammaRamp(self.screenID, self.xDisplay)
File “/usr/local/lib/python3.6/dist-packages/psychopy/visual/backends/gamma.py”, line 152, in getGammaRamp
raise AssertionError(‘XF86VidModeGetGammaRamp failed’)
AssertionError: XF86VidModeGetGammaRamp failed
Exception ignored in: <bound method Window. **del** of <psychopy.visual.window.Window object at 0x7efe6c6834e0>>
Traceback (most recent call last):
File “/usr/local/lib/python3.6/dist-packages/psychopy/visual/window.py”, line 493, in **del**
self.close()
File “/usr/local/lib/python3.6/dist-packages/psychopy/visual/window.py”, line 1277, in close
self.backend.close() # moved here, dereferencing the window prevents
AttributeError: ‘NoneType’ object has no attribute ‘close’

The error is happening here:

File “/usr/local/lib/python3.6/dist-packages/psychopy/visual/backends/gamma.py”, line 152, in getGammaRamp
raise AssertionError(‘XF86VidModeGetGammaRamp failed’)
AssertionError: XF86VidModeGetGammaRamp failed

Could you post your video card information?

You might find some potential solutions in this thread or this github issue.

description: VGA compatible controller
product: Haswell-ULT Integrated Graphics Controller
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version 0b
width: 64 bits
clock: 33 MHz
capabilities: msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=
resources: irq:48 memory:f0000000-f03fffff memory:e0000000-efffffff iopo rt:3000(size=64) memory:c0000-dffff

I re-installed Linux and PsychoPy and now I get this: ValueError: PyCapsule_GetPointer called with incorrect name

Traceback (most recent call last):
  File "/home/toni/untitled_lastrun.py", line 14, in <module>
    from psychopy import locale_setup, sound, gui, visual, core, data, event, logging, clock
  File "/usr/local/lib/python3.6/dist-packages/psychopy/gui/__init__.py", line 45, in <module>
    from .qtgui import *
  File "/usr/local/lib/python3.6/dist-packages/psychopy/gui/qtgui.py", line 48, in <module>
    from psychopy.localization import _translate
  File "/usr/local/lib/python3.6/dist-packages/psychopy/localization/__init__.py", line 23, in <module>
    import wx
  File "/usr/lib/python3/dist-packages/wx/__init__.py", line 17, in <module>
    from wx.core import *
  File "/usr/lib/python3/dist-packages/wx/core.py", line 12, in <module>
    from ._core import *
ValueError: PyCapsule_GetPointer called with incorrect name