chaco icon indicating copy to clipboard operation
chaco copied to clipboard

Importing chaco without X server running causes a crash.

Open midhun-pm opened this issue 5 years ago • 4 comments
trafficstars

Problem Description Trying to import chaco without X server running on Linux causes python to terminate.

Reproduction Steps:

  1. Ensure that the DISPLAY environment variable has been unset in the terminal. unset DISPLAY
  2. Start the Python3.6 interpreter and run import chaco.api
import chaco.api

Expected behavior: Import should not cause a crash. This is important for example, when using chaco on a remote server without X server running. Error on trying to display something is acceptable but not a crash when importing.

OS, Python version: Linux, Python3.6

midhun-pm avatar Jun 04 '20 21:06 midhun-pm

(esg-automation)midhun@midhun-lnx:~$ unset DISPLAY
(esg-automation)midhun@midhun-lnx:~$ python
Enthought Deployment Manager -- https://www.enthought.com
Python 3.6.0 |Enthought, Inc. (x86_64)| (default, Feb 25 2020, 20:22:55) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import chaco.api
: cannot connect to X server 
(esg-automation)midhun@midhun-lnx:~$ 

midhun-pm avatar Jun 05 '20 14:06 midhun-pm

I suspect this is fixed by Enable 5.0.0 since it removes the OpenGL linkage from kiva.agg. It's worth testing.

jwiggins avatar Mar 01 '21 15:03 jwiggins

Ref: enthought/enable#392

jwiggins avatar Mar 22 '21 13:03 jwiggins

Also perhaps explicitly setting the ETS_TOOLKIT environment variable to null to stop ETS trying to import Qt/Wx.

corranwebster avatar Apr 29 '22 09:04 corranwebster