Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

matplotlib gives error because of wrong backend #6

Open
PaulGoslawski opened this issue Jan 15, 2021 · 0 comments
Open

matplotlib gives error because of wrong backend #6

PaulGoslawski opened this issue Jan 15, 2021 · 0 comments

Comments

@PaulGoslawski
Copy link
Contributor

PaulGoslawski commented Jan 15, 2021

Click to expand!
-- elegant_summary:kuske/bessy3_5ba-20p_v_long-bend-tgrb
.  elegant_summary:hwang/bessy3_4sexts_v_1
TaskError - taskid:elegant_summary:hwang/bessy3_4sexts_v_1
PythonAction Error
Traceback (most recent call last):
  File "/net/home/jvl/.cache/pypoetry/virtualenvs/scripts-lTF_g5QG-py3.8/lib/python3.8/site-packages/doit/action.py", line 437, in execute
    returned_value = self.py_callable(*self.args, **kwargs)
  File "/net/home/jvl/nobeam/lattice-summaries-data/scripts/data_elegant.py", line 25, in results
    twiss_plot(twiss_data).savefig(output_dir / "twiss.svg")
  File "/net/home/jvl/nobeam/lattice-summaries-data/scripts/data_elegant.py", line 92, in twiss_plot
    fig, ax = plt.subplots(figsize=FIG_SIZE)
  File "/net/home/jvl/.cache/pypoetry/virtualenvs/scripts-lTF_g5QG-py3.8/lib/python3.8/site-packages/matplotlib/cbook/deprecation.py", line 451, in wrapper
    return func(*args, **kwargs)
  File "/net/home/jvl/.cache/pypoetry/virtualenvs/scripts-lTF_g5QG-py3.8/lib/python3.8/site-packages/matplotlib/pyplot.py", line 1287, in subplots
    fig = figure(**fig_kw)
  File "/net/home/jvl/.cache/pypoetry/virtualenvs/scripts-lTF_g5QG-py3.8/lib/python3.8/site-packages/matplotlib/pyplot.py", line 687, in figure
    figManager = new_figure_manager(num, figsize=figsize,
  File "/net/home/jvl/.cache/pypoetry/virtualenvs/scripts-lTF_g5QG-py3.8/lib/python3.8/site-packages/matplotlib/pyplot.py", line 315, in new_figure_manager
    return _backend_mod.new_figure_manager(*args, **kwargs)
  File "/net/home/jvl/.cache/pypoetry/virtualenvs/scripts-lTF_g5QG-py3.8/lib/python3.8/site-packages/matplotlib/backend_bases.py", line 3494, in new_figure_manager
    return cls.new_figure_manager_given_figure(num, fig)
  File "/net/home/jvl/.cache/pypoetry/virtualenvs/scripts-lTF_g5QG-py3.8/lib/python3.8/site-packages/matplotlib/backends/_backend_tk.py", line 885, in new_figure_manager_given_figure
    window = tk.Tk(className="matplotlib")
  File "/net/home/jvl/miniconda3/lib/python3.8/tkinter/__init__.py", line 2261, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: couldn't connect to display ":0.0"

Current workaround:

MPLBACKEND=SVG poetry run doit
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant