I’m trying to set up a simple application, where a user downloads a file in excel format. In order to do that, I’m using tkinter so when the users presses a button, it opens the window to select where to save the file. And that works wonders when running the file locally. The problem begins when I try to host my app in a CentOs server, as I get the following error displayed inside the app:
TclError: no display name and no $DISPLAY environment variable
I’m not sure of this streamlit is the problem here, but my knowledge in this area and on tkinter is quite limited, so any help would be appreciated.
So, here’s a minimum working example to reproduce the error I’m getting:
import tkinter import streamlit as st def main(): st.write(tkinter.TkVersion) root = tkinter.Tk() if __name__ == '__main__': main()
And if i run that code in CentOS this is what i get:
Python version: 3.6.8
Streamlit version: 0.58
tkinter version: 8.5
Any help would be appreciated on how to solve this error. And if you have any doubt, please ask.