Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

qt5

spyder

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?

like image 608
Brian Avatar asked Jul 06 '18 22:07

Brian


2 Answers

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.

like image 80
Brian Avatar answered Nov 18 '22 11:11

Brian


I ran into a similar issue when running rviz for ros2 from the Windows 10 WSL2 Ubuntu 20.10 Terminal with the command:

ros2 launch turtlebot3_bringup rviz2.launch.py

I tried unchecking the RANDR extension in MobaXterm to no effect. I was finally able to resolve the issue and launch rviz after issuing the following command:

export LIBGL_ALWAYS_INDIRECT=0

and then re-issuing the ros2 launch command above.

like image 29
Tom S Avatar answered Nov 18 '22 09:11

Tom S