Question:
How do I get GUI working on Replit when using PySimpleGUI?
Current behavior:
When I press run the console loads for a bit until I get a tkinter error saying it can’t connect to the display:
_tkinter.TclError: couldn't connect to display ":0"
Desired behavior
I just want it to display the GUI correctly. I’ve seen online that something you’re supposed to do is set the display to UNIX$DISPLAY but I have no clue how to do that or if that’ll even work for repls.
Repl link:
https://replit.com/@HenryParsons/ICA-Scraper
while True:
event, values = window.read()
global InputURL
InputURL = values["-INPUT-"]
if values["-KEYWORDS-"] == "Gluten":
re_SelectedKeyWords = re.compile("|".join(GlutenFreeKeyWords))
AllergenFree = False
elif values["-KEYWORDS-"] == "Lactose":
re_SelectedKeyWords = re.compile("|".join(LactoseKeyWords))
AllergenFree = False
elif values["-KEYWORDS-"] == "Deez Nuts":
re_SelectedKeyWords = re.compile("|".join(DeezNutsKeyWords))
# End program if user closes window or
# presses the OK button
if event == sg.WIN_CLOSED or event == '-EXIT-':
sys.exit()
elif event == '-SUBMIT-':
print(InputURL)
c.crawl(Spider)
c.start()