QXcbConnection: XCB error: 145 (Unknown) Error message starting Spyder with MobaXTerm Qt5

Brian picture Brian · Jul 7, 2018 · Viewed 11.8k times · Source

I'm seeing the following error message when starting Spyder over a remote connection through MobaXTerm:

$ spyder
QXcbConnection: XCB error: 145 (Unknown), sequence: 171, resource id: 0, major code: 139 (Unknown), minor code: 20

Spyder still appears to work normally, but the error message pops up every time. A search on this error blames Qt5 and says there's no fix for X11 connections. I'm using Python 3.5.4, Spyder 3.2.3, and MobaXTerm Personal Edition v10.7 Build 3650 connecting to a system running RHEL 6.6.

How can I avoid the error message?

Answer

Brian picture Brian · Jul 7, 2018

After trying the methods I could find on various websites:

  • conda install pyopengl on the base python installation
  • Adding both from OpenGL import GL and import ctypes; ctypes.CDLL("libGL.so.1", mode=ctypes.RTLD_GLOBAL) to site-packages/spyder/app/start.py
  • various Qt environment variable settings

EDIT:

I was finally able to stop the error messages by disabling only the "RANDR" MobaXTerm X11 extension:

X11_Settings

Interestingly, the MobaXTerm documentation also has this extension disabled in the settings screenshots.