FAQ

BUGS & SOLUTIONS

Error with submission script

Error no display name and no $DISPLAY with python scripts that use matplotlib:

While running a python script that use Matplotlib and try to save a figure on a server it is mandatory to use a non-GUI backend for Matplotlib even just to save the figure. Indeed, an error or a warning can been raised or simply the output file will not be created but the script will end successfuly.

Error: no display name and no $DISPLAY environment variable.

The solution is to add those lines at the top of the python script

import matplotlib
matplotlib.use("Agg")

A userwarning will be raised

/home/user1/works/venv/local/lib/python2.7/site-packages/matplotlib/figure.py:457: UserWarning: matplotlib is currently using a non-GUI backend, so cannot show the figure
"matplotlib is currently using a non-GUI backend, "

Error Terminus’s daemonization

Error -A option unrecognized with Celery daemonization:

> journalctl -xe
  Error: no such option: -A
  oct. 28 15:24:12 Workstation sh[23120]: celery multi v5.0.0 (singularity)
  oct. 28 15:24:12 Workstation sh[23120]: > Starting nodes...
  oct. 28 15:24:12 Workstation sh[23120]:         > celery1@workstation: * Child terminated with exit code 2
  oct. 28 15:24:12 Workstation sh[23120]: FAILED
  oct. 28 15:24:12 Workstation sh[23144]: > celery1@workstation: DOWN
  oct. 28 15:24:27 Workstation sh[23222]: Usage: __main__.py worker [OPTIONS]
  oct. 28 15:24:27 Workstation sh[23222]: Try '__main__.py worker --help' for help.
  oct. 28 15:24:27 Workstation sh[23222]: Error: no such option: -A

This is a reported error in Celery 5.0.0, that has been fixed `Celery_issue_6363`_. Upgrade the celery to 5.0.1 fix that issue.