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
The application is developed using streamlit, but considering the problem only happens when I use a different OS, I'm not sure of this framework being the cause. Regardless, and since my knowledge in this area and on tkinter is quite limited, I've also posted this question in the respective forum.
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:
I've search online and found this and this but not only am I not using ssh after I update the code access the CentOS server, I'm also not using matplotlib.
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.