chaco
chaco copied to clipboard
Importing chaco without X server running causes a crash.
Problem Description Trying to import chaco without X server running on Linux causes python to terminate.
Reproduction Steps:
- Ensure that the DISPLAY environment variable has been unset in the terminal.
unset DISPLAY - 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
(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:~$
I suspect this is fixed by Enable 5.0.0 since it removes the OpenGL linkage from kiva.agg. It's worth testing.
Ref: enthought/enable#392
Also perhaps explicitly setting the ETS_TOOLKIT environment variable to null to stop ETS trying to import Qt/Wx.