Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_tkinter.TclError: couldn't connect to display #224

Open
jesenzhang opened this issue Feb 21, 2024 · 0 comments
Open

_tkinter.TclError: couldn't connect to display #224

jesenzhang opened this issue Feb 21, 2024 · 0 comments

Comments

@jesenzhang
Copy link

jesenzhang commented Feb 21, 2024

sys:
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal

run the simple code:
import easygui
easygui.ynbox('Shall I continue?', 'Title', ('Yes', 'No'))

report error:
Traceback (most recent call last):
File "/media/kohya_ss/tktest.py", line 2, in
easygui.ynbox('Shall I continue?', 'Title', ('Yes', 'No'))
File "/anaconda3/envs/comfy/lib/python3.11/site-packages/easygui/boxes/derived_boxes.py", line 54, in ynbox
return boolbox(msg=msg,
^^^^^^^^^^^^^^^^
File "/anaconda3/envs/comfy/lib/python3.11/site-packages/easygui/boxes/derived_boxes.py", line 133, in boolbox
reply = buttonbox(msg=msg,
^^^^^^^^^^^^^^^^^^
File /anaconda3/envs/comfy/lib/python3.11/site-packages/easygui/boxes/button_box.py", line 95, in buttonbox
bb = ButtonBox(
^^^^^^^^^^
File "/anaconda3/envs/comfy/lib/python3.11/site-packages/easygui/boxes/button_box.py", line 147, in init
self.ui = GUItk(msg, title, choices, images, default_choice, cancel_choice, self.callback_ui)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/anaconda3/envs/comfy/lib/python3.11/site-packages/easygui/boxes/button_box.py", line 263, in init
self.boxRoot = tk.Tk()
^^^^^^^
File "/anaconda3/envs/comfy/lib/python3.11/tkinter/init.py", line 2326, in init
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: couldn't connect to display ""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant