Problem with X DISPLAY when open3d draw geometry used - python

I get the following error:
[1;33m[Open3D WARNING] GLFW Error: X11: Failed to open display :0.0[0;m
[1;33m[Open3D WARNING] Failed to initialize GLFW[0;m
[1;33m[Open3D WARNING] [DrawGeometries] Failed creating OpenGL window.[0;m
I have tried using open3d and when I try to get a 3d mesh, I get the above mentioned error. I tried using Xming with X11 enabled and giving IP address of Linux environment in cluster where the code is written and using putty I tried export display=(Linux IP address):(port number) in terminal after connecting to SSH through putty. It didn't work. How can I resolve this error to get the display active ?

Related

PyVisa - Cannot connect via VICP but TCPIP works?

I am having an issue connect to a LeCroy oscilloscope using PyVisa v1.9.
If I trying to connect using the code:
import visa
from pyvisa.resources import MessageBasedResource
visa.log_to_screen()
rm = visa.ResourceManager()
my_instrument = rm.open_resource('VICP::10.2.72.141:INSTR', resource_pyclass=MessageBasedResource)
I get the error: VisaIOError: VI_ERROR_RSRC_NFOUND (-1073807343): Insufficient location information or the requested device or resource is not present in the system.
However, if I change to:
my_instrument = rm.open_resource('TCPIP::10.2.72.141:INSTR', resource_pyclass=MessageBasedResource)
The code with connect with the instrument, but the functions in my driver no longer work. Read commands also respond with:
‘WARNING : CURRENT REMOTE CONTROL INTERFACE IS TCPIP’
I never saw an issue before moving to version 1.9 of pyvisa.
Python version is 2.7 64-bit, running on windows 10 64bit
Any hints would be appreciated.

Running an opencv based python script on a remote server with ssh forwarding from my macbook gives me an error

I am trying to run a python script on a remote server, which includes displaying images. The image does not get displayed and I get an error Gtk-WARNING **: cannot open display:
I have checked posts where they suggest editing the flags in sshd_config and also setting the DISPLAY variable manually. But, none of that seems to be working for me.
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost no
XAuthLocation /usr/X11/bin/xauth
Running xclock or xeyes also gives me errors.
Edit: I used ssh -X and ssh -Y to ssh into the server, neither worked
Solution: Restart after installing XQuartz
After looking through multiple posts and trying to make it work, I realised that after installing XQuartz, the user is required to restart the machine. It allows to set the correct environment variables (like DISPLAY). It works for me now after having restarted.
Alternative
However, in case you face a similar problem, not stemming due to the restart issue, I found an alternate way as suggested in the following link:
https://uisapp2.iu.edu/confluence-prd/pages/viewpage.action?pageId=280461906

PyQt4 or PyQt5 from framebuffer without X server

I'm trying to run a PyQt gui application from console on a Raspberry Pi 3.
Withough X11 server.
I tried xvfb-run python test.py but it did not work.
In the case of PyQt4, it outputs
"python: Fatal IO error 11 (Resource temporarily unavailable) on X server :99."
When I terminate the process.
In the case of PyQt5, it outputs
"libEGL warning: DRI2: failed to create any config
Cant find EGLConfig, returning null config
Unable to find an X11 visual which matches EGL config 0
Could not initialize OpenGL for RasterGLSurface, reverting to RasterSurface.
Unsupported screen depth: 8"
and then throws this when I kill the process
"The X11 connection broke (error 1). Did the X11 server die?"
I'm running raspian jessie
Any idea how to get this working ?

How to Resolve, HTTP ERROR: 500 When starting ipython [notebook]

I am new to Anaconda and wanted to get started with Pandas, But unfortunately, when I want to launch the jupyter [notebook], I get the error shown in the Picture
HTTP ERROR: 500
Internal Server Error
RequestURI=http://localhost:8888/tree
I realized that the machine was running on a VPN and for some reasons, ipython could not launch on the Virtual Address.I disabled the VPN and notebook loaded on the browser

Pygame.display.init() error: "No available video device", on VPS Server

I'm trying to run a pygame script on a vps server, and I'm receiving an error on the pygame.display.init().
Following the directions found here http://www.pygame.org/docs/ref/display.html#pygame.display.init and in other sources, I used all this configurations before the init():
os.environ["​​SDL_VIDEODRIVER"]="dummy"
os.environ["SDL_VIDEODRIVER"]="x11"
os.environ["SDL_VIDEODRIVER"]="dga"
os.environ["SDL_VIDEODRIVER"]="fbcon"
os.environ["SDL_VIDEODRIVER"]="directfb"
os.environ["SDL_VIDEODRIVER"]="ggi"
os.environ["SDL_VIDEODRIVER"]="vgl"
os.environ["SDL_VIDEODRIVER"]="svgalib"
os.environ["SDL_VIDEODRIVER"]="aalib"
So, the "dummy" option causes the script to go into a loop. Any other option give me the error:
<class 'pygame.error'>: No available video device
I have x11 installed. I'm calling the python script from a php file, so, I would expect the graphic output to go inside the browser, or, the "video device" to be set automatically as the user browser. Not happening.
Are you ssh'd into the vps server? Have you tried x forwarding, ssh -X user#server.com then when you run the script from the command line it should open on your window

Categories