Getting the following error on a repl
of mine (Tic-Tac-Toe GUI) where I'm using Tkinter
.
Traceback (most recent call last):
File "main.py", line 99, in <module>
root = tk.Tk()
File "/nix/store/hd4cc9rh83j291r5539hkf6qd8lgiikb-python3-3.10.8/lib/python3.10/tkinter/__init__.py", line 2299, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: couldn't connect to display ":0"
It was working up until yesterday.
This seems to be an error faced by people working on less popular Linux distros (local machine _tkinter.TclError: couldn't connect to display ":0") and the following update to the PATH variable seems to be fixing the issue.
export DISPLAY=unix$DISPLAY
Not sure why suddenly this became an issue, also, not sure how I can fix it on Replit. Any suggestions/help will be appreciated.