Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

X Error: BadDrawable (invalid Pixmap or Window parameter) when launching Spyder on GNOME

sorry if this question is not as detailed and focused as it should be. I am a Linux user (so no admin privileges of any sort) and just installed Anaconda3 from here and followed the instructions.

Note that my Linux machine is not connected to the internet, so I had to transfer the file through other means and just run bash Anaconda... as instructed in the Continuum site.

I have then succesfully launched IPython and tried to plot inline, without problems. However, when I tried to use plotting in windows, I got this kind of output from the terminal:

X Error: BadDrawable (invalid Pixmap or Window parameter) 9   Major opcode: 62 (X_CopyArea) 

And the created graph window was just blank.

I then tried to start Spyder and basically saw the same behaviour: a lot of those errors reported above, and the Spyder window just popped up blank.

Google search for the error gives results reported for Qt, which makes sense since when plotting "offline" (as opposed to inline) then QtAgg is used.

However, I have no clue as to where to look for the version of these libs, how to install/compile new ones, whether that is really the issue or not. I am just to ignorant about Linux.

Anybody can hint on what to look for and how to try to debug this behaviour?

like image 785
Michele Ancis Avatar asked Dec 19 '22 19:12

Michele Ancis


2 Answers

I had the same error. What worked for me is to add this line in /etc/environment.

sudo nano /etc/environment

Add this line QT_X11_NO_MITSHM=1

Source : https://github.com/P0cL4bs/WiFi-Pumpkin/issues/53#issuecomment-309120875

Note that in my case the fix didn't take effect until I rebooted my machine.

like image 189
Mathieu Châteauvert Avatar answered Dec 21 '22 08:12

Mathieu Châteauvert


you may simply run on the terminal:

export QT_X11_NO_MITSHM=1

like image 21
Pravin Ranjan Avatar answered Dec 21 '22 09:12

Pravin Ranjan