SunPengChuan / wgdi

WGDI: A user-friendly toolkit for evolutionary analyses of whole-genome duplications and ancestral karyotypes
https://wgdi.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
114 stars 22 forks source link

_tkinter.TclError: couldn't connect to display "localhost:21.0" #30

Closed tinyfallen closed 1 year ago

tinyfallen commented 1 year ago

Hi dear developer,

Thanks for the great tools. As I upgrated wgdi to 0.6.4, the error occured. I supposed it may due to that I use a remote sge server without the support of interactive backend. Could please give me some suggestions how to handle the problem? Many thanks!

$ wgdi -d conf.dot
blast  =  pame.pep.dia
gff1  =  pame.gff
gff2  =  pame.gff
lens1  =  pame.len
lens2  =  pame.len
genome1_name  =  pame
genome2_name  =  pame
multiple  =  1
score  =  100
evalue  =  1e-5
repeat_number  =  10
position  =  end
blast_reverse  =  false
ancestor_left  =  none
ancestor_top  =  none
markersize  =  0.5
figsize  =  10,10
savefig  =  dot.pdf
Traceback (most recent call last):
  File "/export/home/ydn/.conda/envs/yty/bin/wgdi", line 8, in <module>
    sys.exit(main())
  File "/export/home/ydn/.conda/envs/yty/lib/python3.7/site-packages/wgdi/run.py", line 163, in main
    module_to_run(arg, value)
  File "/export/home/ydn/.conda/envs/yty/lib/python3.7/site-packages/wgdi/run.py", line 122, in module_to_run
    run_subprogram(program, conf, name)
  File "/export/home/ydn/.conda/envs/yty/lib/python3.7/site-packages/wgdi/run.py", line 87, in run_subprogram
    r.run()
  File "/export/home/ydn/.conda/envs/yty/lib/python3.7/site-packages/wgdi/dotplot.py", line 92, in run
    fig, ax = plt.subplots(figsize=self.figsize)
  File "/export/home/ydn/.conda/envs/yty/lib/python3.7/site-packages/matplotlib/cbook/deprecation.py", line 451, in wrapper
    return func(*args, **kwargs)
  File "/export/home/ydn/.conda/envs/yty/lib/python3.7/site-packages/matplotlib/pyplot.py", line 1288, in subplots
    fig = figure(**fig_kw)
  File "/export/home/ydn/.conda/envs/yty/lib/python3.7/site-packages/matplotlib/pyplot.py", line 694, in figure
    **kwargs)
  File "/export/home/ydn/.conda/envs/yty/lib/python3.7/site-packages/matplotlib/pyplot.py", line 316, in new_figure_manager
    return _backend_mod.new_figure_manager(*args, **kwargs)
  File "/export/home/ydn/.conda/envs/yty/lib/python3.7/site-packages/matplotlib/backend_bases.py", line 3494, in new_figure_manager
    return cls.new_figure_manager_given_figure(num, fig)
  File "/export/home/ydn/.conda/envs/yty/lib/python3.7/site-packages/matplotlib/backends/_backend_tk.py", line 885, in new_figure_manager_given_figure
    window = tk.Tk(className="matplotlib")
  File "/export/home/ydn/.conda/envs/yty/lib/python3.7/tkinter/__init__.py", line 2023, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: couldn't connect to display "localhost:21.0"
SunPengChuan commented 1 year ago

You can try reinstalling the matplotlib package.

tinyfallen commented 1 year ago

You can try reinstalling the matplotlib package.

Many thanks for your timely reply! It works~