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

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?

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.

you may simply run on the terminal:
export QT_X11_NO_MITSHM=1

I had this same error, so I'll tell you what worked for me.
I think it is a permissions issue, based on the following:
I was logged in through a VNC server window through my account, but within the VNC server was setting up a user profile for "user2". In a 'user2' console I installed anaconda in user2's directory. When I typed spyder in the user2 console, I got the exact error you describe. I guessed the VNC desktop didn't like user2 trying to open a window on user1's profile. I then logged out of my VNC server window, logged into the user2 vnc server window, and in a console typed 'spyder' and it opened perfectly.
I think for some reason it is trying to open but is installed in a directory that you don't have permissions for or trying to open in a window that you don't have access to.

Related

Ensuring RStudio always restarts in administrator mode

Sometimes I receive notifications that I am trying to updating already-loaded packages from RStudio and am prompted to choose if I want to restart R(Studio) or not. I've noticed that sometimes I will have write permission issues after this, despite having RStudio set to run as an administrator. My hunch is that this is because I have set the permissions for a specific shortcut (see below) and not for RStudio itself (if this even happens) -- accordingly when it restarts, it isn't restarting the same way as I ran the program in the first place and thus is not in administrator mode.
Am I correct that this can happen and, if so, is there some sore of way to consistently ensure it is run in administrator mode? I'm asking this on SO since I'm guessing there is probably a way within R or on the command line to ensure this, if it can indeed happen. I'm on a single-user Windows 10 machine.

Can cloud instances of Jupyter Lab support pop out interactive windows

I'm new to Jupyter notebooks/Lab and I've successfully got interaction with pop-out windows and buttons etc with ipywidgets on local instances of Jupyter Lab but not in the cloud when using notebooks.ai - the code runs without error but doesn't create the appropriate windows/button.
Is there anyway to get this working or is this an inherent restriction of using Jupyter Lab in the cloud?
I'm wondering whether there are firewall settings that need configuring to get this to work?
The X11 forwarding is disabled on the docker machines provided by notebooks.ai. Hence, any pop-up interaction is not being forwarded to your machine. However, you can see any inline plot/button in the Jupyter notebook.
If you are interested in this feature there is a GitHub repository to request features (I have never tried it) but might be interesting for you to receive a more in-depth explanation, workaround, or solution.
PROVE:
In the launcher tab you can either run a notebook, a python interpreter or a terminal on the remote docker machine. If you select the terminal and type echo $DISPLAY, you will see that the result is an empty line (if a valid display was attached you will see something like: DISPLAY=localhost:11.0).
For further information about using BASH to check if X11 forwarding is enabled from SSH check this question.

Impossibily to run Jupyter notebook from Windows start menu and required tokens

I am a novice in the use of Python and I am using PandasBiogeme to estimate discrete choice models.
My issue is related to the Jupyter notebook. Usually when I wish to use it, I select it from the start menu of Windows 7 and automatically a new tab opens up in Chrome.
Yesterday, actually by not knowing exactly why, I logged out from Jupyter notebook and today when I launched it from the start menu the following error message appeared:
I thus decided to reinstall Anaconda, and PandasBiogeme and to update both of them.
Now when I wish to open Jupyter notebook from the start menu a prompt menu appears and suddenly disappears. Therefore I need to open the Anaconda Powershell and type
jupyter notebook
Yet, when I do this I receive the same error message I reported above
I typed in the second URL and I was then able to work again.
Yet, when I close Jupyter notebook and try to launch it again the same problem arises and I have to insert again 'a' token. I wrote 'a' token, because if I select by chance the token reported at the following URL (which has nothing to do with my work)
https://jupyter-notebook.readthedocs.io/en/stable/security.html
namely, this one:
http://localhost:8888/?token=c8de56fa4deed24899803e93c227592aef6538f93025fe01
and then Jupyter notebook works and I can carry out my estimation.
I read different posts on the possibility to set a password to avoid problems related to tokens, but only the first time I inserted the token I had the option to insert a password in in a html page, but I decided not to do it. Now I believe it could be the case.
This is something that happened overnight, without, I believe, my doing anything specifically.
This issue is driving me crazy and I would be thankful if any of you had a potential suggestion.
Many thanks.
Marco

Console isn't showing up when running print() using LOVE2d with atom-editor

Using atom-editor 1.13 with the love-ide package installed to run LOVE2d 10.2 games (windows 7)
Apparently if you create a conf.lua file in the same folder as your main.lua file you can add some configuations to main.lua. So, I've got these lines of code in my conf.lua to show console.
function love.conf(t)
t.console = true
end
But when I go back to my main.lua and type print("ballz"), all I see is a blank LOVE2d game screen with no extra console window. Not really sure if this is because I'm using atom editor or not. Everything seems to be PATH'ed correctly.
On a side note, whenever I run atom using the love-ide package it always tries to install some "dependecy files" like the hyperclick-love package, and the auto-complete-love package. These fail to install because I don't have git installed.. honestly I really don't know what git is, but neither it, hyperclick, or auto-complete seemed like requirements to run my game, so in the spirit of not installing unnecessary things onto my computer I never installed these things... annoying as it is to see this notification always pop up when I start atom. Anyone know if this is contributing to the issue, or know a way to remove these notifications or auto-download-attempts? My LOVE2d code still seems to run without these packages.
Have you set up the terminal emulator in your configuration?
(Windows only) Try using the lovec.exe executable instead of the normal love.exe. The first one attaches to the console that executed the game, the second one ignores it.
Lua has a buffered output, try adding io.stdout:setvbuf('no') to the top of main.lua

Text invisible in RStudio shell on server

When I access the RStudio (hosted on a server) shell (Tools > Shell...), I gain admin access by using sudo R, then typing my password, which I know is invisible for security reasons. However, every subsequent line of code I type is also invisible.
For example, say I want to download a package to make it available on the server. I use:
install.packages("spls", lib="/usr/lib/R/library")
The above text does not show up, but when I press Enter, it does execute and I'm asked for a mirror to use. The package then is correctly installed. Thus, the only problem is not being able to see the text. This happens for anything I type in the shell.
I'm not the host of the server, but I do know it uses Ubuntu, I believe the RStudio version is 0.99.473 and the R version is definitely 3.2.1. I'm running on a Mac with Yosemite and Safari. If more specific information would be helpful, I can contact the host.
Does anyone know what might be causing this issue and how to fix it?

Resources