PySimpleGUI not working in repl

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()

There is an issue with DISPLAY in replit or so it seems.

Welp, that’s inconvenient. Thanks for the quick response anyways :slight_smile:

This type of error seems to be happening to multiple people who are trying to use different methods of any type of display, so I think it’s something on the server-side, rather than something we may be able to fix.

1 Like

Guys/girls just wait it out i know its sounds stupid but that’s what we can do now…