Author: tlinnet Date: Sat Nov 28 11:57:41 2015 New Revision: 28120 URL: http://svn.gna.org/viewcvs/relax?rev=28120&view=rev Log: Fix for running relax at a server with no graphical display and using matplotlib.
The error was found by: relax_trunk --time -s Relax_disp.test_repeat_cpmg -d And the error generated was: QXcbConnection: Could not connect to display Aborted (core dumped) The backend of matplotlib have to be changed. This is for example described in: http://stackoverflow.com/questions/2766149/possible-to-use-pyplot-without-display http://stackoverflow.com/questions/8257385/automatic-detection-of-display-availability-with-matplotlib The solution is: import matplotlib if not "DISPLAY" in environ: # Force matplotlib to not use any Xwindows backend. matplotlib.use('Agg') Modified: trunk/dep_check.py Modified: trunk/dep_check.py URL: http://svn.gna.org/viewcvs/relax/trunk/dep_check.py?rev=28120&r1=28119&r2=28120&view=diff ============================================================================== --- trunk/dep_check.py (original) +++ trunk/dep_check.py Sat Nov 28 11:57:41 2015 @@ -28,7 +28,7 @@ # Python modules. import platform -from os import F_OK, access, sep +from os import F_OK, access, environ, sep from re import sub import sys @@ -133,6 +133,9 @@ try: import matplotlib matplotlib_module = True + if not "DISPLAY" in environ: + # Force matplotlib to not use any Xwindows backend. + matplotlib.use('Agg') except ImportError: matplotlib_module = False _______________________________________________ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits