gtburst not working
Opened this issue · 3 comments
Hello everyone, when I installed fermitools, it showed that the installation was successful, but when I used Gtburst, the following error occurred!
(fermi3ML) lm@LAPTOP-PGKLAI6C:~$ gtburst
Loading pyBurstAnalysisGUI v. 03-00-00p5 ....... done
Traceback (most recent call last):
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/site-packages/fermitools/gtburst.py", line 137, in handle_exception
return method(*args, **kwargs)
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/site-packages/fermitools/gtburst.py", line 585, in main
self.root = Tk()
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/tkinter/init.py", line 2270, in init
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/site-packages/fermitools/gtburst.py", line 137, in handle_exception
return method(*args, **kwargs)
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/site-packages/fermitools/gtburst.py", line 179, in init
self.main()
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/site-packages/fermitools/gtburst.py", line 154, in handle_exception
showerror("Unhandled exception", msg)
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/tkinter/messagebox.py", line 98, in showerror
return _show(title, message, ERROR, OK, **options)
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/tkinter/messagebox.py", line 76, in _show
res = Message(**options).show()
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/tkinter/commondialog.py", line 42, in show
w = Frame(self.master)
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/tkinter/init.py", line 3124, in init
Widget.init(self, master, 'frame', cnf, {}, extra)
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/tkinter/init.py", line 2566, in init
BaseWidget._setup(self, master, cnf)
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/tkinter/init.py", line 2533, in _setup
master = _get_default_root()
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/tkinter/init.py", line 298, in _get_default_root
root = Tk()
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/tkinter/init.py", line 2270, in init
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/lm/miniconda3/envs/fermi3ML/bin/gtburst", line 11, in
sys.exit(main())
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/site-packages/fermitools/gtburst.py", line 2118, in main
g = GUI()
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/site-packages/fermitools/gtburst.py", line 154, in handle_exception
showerror("Unhandled exception", msg)
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/tkinter/messagebox.py", line 98, in showerror
return _show(title, message, ERROR, OK, **options)
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/tkinter/messagebox.py", line 76, in _show
res = Message(**options).show()
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/tkinter/commondialog.py", line 42, in show
w = Frame(self.master)
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/tkinter/init.py", line 3124, in init
Widget.init(self, master, 'frame', cnf, {}, extra)
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/tkinter/init.py", line 2566, in init
BaseWidget._setup(self, master, cnf)
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/tkinter/init.py", line 2533, in _setup
master = _get_default_root()
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/tkinter/init.py", line 298, in _get_default_root
root = Tk()
File "/home/lm/miniconda3/envs/fermi3ML/lib/python3.9/tkinter/init.py", line 2270, in init
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
Note:
OS: WSL
fermitools v2.2.0
GUIs like gtburst use X-Windows (aka X11) system that is common on Unix and Linux. The "no $DISPLAY environment variable" indicates that gtburst can't communicate with X windows system. Since you are using the Windows Subsystem for Linux, I'm guessing something didn't get setup correctly. The FSSC doesn't have much experience with WSL support (since we mostly use Linux and MacOS machines), so it's difficult to say how to fix it. It might be as simple as setting "export DISPLAY=:0", but you will probably need to google something like "WSL and X-Windows" or "WLS and display variable". Maybe something on this page might help:
https://askubuntu.com/questions/1299323/how-to-set-up-display-variable-for-wsl2-of-ubuntu-20
It's strange, when I set export DISPLAY=:0, it still doesn't work.
(base) lm@LAPTOP-PGKLAI6C:~$ fv
application-specific initialization failed: couldn't connect to display ":0"
Error in startup script: couldn't connect to display ":0"
while executing
"load /home/lm/workdir/heasoft/tcltk/x86_64-pc-linux-gnu-libc2.31/lib/libtk8.6.so Tk"
("package ifneeded Tk 8.6.11" script)
invoked from within
"load /home/lm/workdir/heasoft/tcltk/x86_64-pc-linux-gnu-libc2.31/lib/itk4.1.0/libitk4.1.0.so Itk"
("package ifneeded Itk 4.1.0" script)
invoked from within
"package require Itk"
(procedure "fvInit" line 11)
invoked from within
"fvInit"
("eval" body line 1)
invoked from within
"eval fvInit $argv"
(file "/home/lm/workdir/heasoft/x86_64-pc-linux-gnu-libc2.31/lib/fv/fvInit.tcl" line 18)
@Liaomao123 Windows 10 is not working yet, you can try to upgrade your system to windows11 professional edition, all my current GUI tools can be used in windows11 system.